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  Binance Launchpad APY ne demek?

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 association Aggregation and composition explain with examples?

Leave a Reply

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