Favor Composition does what and how? Solution We know what is inheritance, inheritance is an oops feature, acquiring existing properties form the existing class isknow as inheritance. when a Field’s type is a class, the field will hold a reference to another object, thus creating an association relationship between them. Without getting into the nuances of the difference between simple association, aggregation, and composition, let’s intuitively define composition as when the class uses another object to provide some or all of its functionality. Favor composition over inheritance is a one of the popular object-oriented design principles, which helps to create flexible and maintainable code in Java and other object-oriented languages A super class reference variable can refer to an instance of sub class. By using composition, you don’t get this behavior, but still it offers a lot more to tilde the balance in its side. Inheritance and composition relationships are also referred as IS-A and HAS-A relationships. Favor composition give.