Why do we need composition in Java?

Benefits of using Composition: Composition allows us to reuse the code . In Java, we can use multiple Inheritance by using the composition concept. The Composition provides better test-ability of a class. Composition allows us to easily replace the composed class implementation with a better and improved version.

Sizin İçin Seçtik  What is composition in Example?

Leave a Reply

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

Why do we need composition in Java?

Benefits of using Composition: Composition allows us to reuse the code . In Java, we can use multiple Inheritance by using the composition concept. The Composition provides better test-ability of a class. Composition allows us to easily replace the composed class implementation with a better and improved version.

Sizin İçin Seçtik  What is aggregation in UML?

Leave a Reply

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