What is composition in Java?

The composition is a design technique in java to implement a has-a relationship . Java Inheritance is used for code reuse purposes and the same we can do by using composition. The composition is achieved by using an instance variable that refers to other objects.

Sizin İçin Seçtik  How can I get iOS 2021 Developer?

Leave a Reply

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