"Aggregation in Java "
In Java Aggregation, represent a relationship between two classes that are used to describe the “has-a" relationship between objects. It is a more
flexible and advanced version of the association. It contains the address of another class and each class is considered as a part of the aggregation class.
And the reusability of code is achieved by aggregation if there is no “is-a” relationship.
Aggregation represents a relationship where the child can exist independently of the parent class. For Example, if you create a class (parent) and the second class is a child, and delete the class parent then the child exists.
Aggregation implies a relationship where the child can exist independently of the parent. Example: Class (parent) and Student (child). Delete the Class and the Students still exist.