HDTutorial
EN

Playback starts YouTube’s embedded player (privacy-enhanced mode).

Learn Java Programming - Aggregation Tutorial

26,252 views October 27, 2016 10:41

Watch on YouTube
ChannelDaniel Ross

Description from the creator

I highly recommend watching my Composition Tutorial prior to watching this one. We learned that an object demonstrating composition is composed of other objects that are created inside of the object during instantiation. The lifetime of those "internal" objects are entirely dependent upon the enclosing object. When the instance of the enclosing object is destroyed, those "internal" objects are destroyed as well. Aggregation is very similar to composition only with one key difference. An object demonstrating aggregation is composed of other objects that are created outside of the object during instantiation. In aggregation, the lifetime of those "internal" objects are not dependent upon the enclosing object. When the instance of the enclosing object is destroyed, those "internal" objects are still alive because they were created elsewhere. Consider the following code that demonstrates aggregation...

About this tutorial

Daniel Ross published this 10:41 video tutorial on October 27, 2016. It has been watched 26,252 times on YouTube.

Category
Education
Duration
10:41
Published
October 27, 2016
Views
26,252
Likes
192

Tags

Share

This tutorial in other languages