Why do we use aggregation in Java?

Aggregation helps in reusing the code . Object B can have utility methods and which can be utilized by multiple objects. Whichever class has object B then it can utilize its methods.

Sizin İçin Seçtik  What is composition and aggregation in C++?

Leave a Reply

Your email address will not be published. Required fields are marked *

Why do we use aggregation in Java?

Aggregation helps in reusing the code . Object B can have utility methods and which can be utilized by multiple objects. Whichever class has object B then it can utilize its methods.

Sizin İçin Seçtik  How do you show aggregation in UML?

Leave a Reply

Your email address will not be published. Required fields are marked *