Composition and Aggregation using Java
There is always been confusion about composition and aggregation. While in servicing NetSol Technologies, I came to learn practically what is composition and aggregation. First thing is both are type of association. Below is the exact definition of each term and then practical Java code, where you can understand exactly how can we implement composition and aggregation in programming.
Composition: Life time of objects got to be the same. For example there is a composition between car-frame and a car. If the car gets destroyed the car-frame would also get destroyed.
Aggregation: Life times of the objects are not the same, one object can live even after the other object has been destroyed.
Posted in Java














I, Faisal Basra, keen of Java development. My area of interest are Enterprise java development using latest frameworks like Hiberantes, Struts, JSF and Spring. Currently, I am working in NetSol working in Java EE field.
Apart from the java development, I also have interest in Internet marketing specially in the field of Search Engine Marketing / Search Engine Optimization.
The, very next interest I have is of Web Development side. The Internet speaks the language of PHP, MySQL, Apache and Linux thus mostly said simply its LAMP. So, I also have developed several websites using PHP and related technologies.
