1.

What is it called where child object gets killed if parent object is killed?(a) Aggregation(b) Composition(c) Encapsulation(d) AssociationThe question was asked during an interview.Origin of the question is Concepts of OOPs topic in portion Java Environment & OOPS Concepts of Java

Answer»

The correct OPTION is (b) Composition

Easiest explanation: Composition occurs when CHILD OBJECT gets killed if parent object gets killed. Aggregation is also known as STRONG Aggregation.



Discussion

No Comment Found

Related InterviewSolutions