Association, Composition and Aggregation in Java

Association is relationship between two classes that establish through object in association there are two types

Association its weakly coupled that an object can stay even the other object get destroyed eg an bank can stay without employess and vice versa. Aggregation helps in reusing the code.

Composition its strongly coupled one object cannt stay if other object get destroyed eg library cannt stay if books are destroyed