What is aggregation in Java?
Answers
Answered by
2
Question - What is aggregation in Java?
Answer - Aggregation in Java is a relationship between two classes that is best described as a "has-a" and "whole/part" relationship. ... The aggregate class contains a reference to another class and is said to have ownership of that class. Each class referenced is considered to be part-of the aggregate class.
HOPE IT HELPS!! ✌️☺️✌️
Answered by
8
Answer:
When an object A contains a reference to another object B or we can say Object A has a HAS-A relationship with Object B, then it is termed as Aggregation. Aggregation helps in reusing the code.
Similar questions
Chemistry,
7 months ago
Physics,
7 months ago
Computer Science,
1 year ago
Math,
1 year ago
Chemistry,
1 year ago