Computer Science, asked by monirul2067, 1 year ago

What is aggregation in Java?

Answers

Answered by deeksha7790
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 VISHALKUMARV22
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