What is Composition and Aggregation in Java. What are the differences and Sample codes.

Опубликовано: 02 Октябрь 2024
на канале: Ashok Dhulipalla
20,671
312

#AshokSoftwareDeveloper

1. Composition is a specialized form of aggregation in which if the parent object is destroyed, the child objects would cease to exist.
2. Aggregation is a specialized form of association between two or more objects in which the objects have their own life-cycle but there exists an ownership as well

#SkillSetGo