JavaObject Oriented ProgrammingProgramming. The composition is a design technique in which your class can have an instance of another class as a field of your class. Inheritance is a mechanism under which one object can acquire the properties and behavior of the parent object by extending a class.18 Kas 2019
What is Inheritance and composition in Java?
JavaObject Oriented ProgrammingProgramming. The composition is a design technique in which your class can have an instance of another class as a field of your class. Inheritance is a mechanism under which one object can acquire the properties and behavior of the parent object by extending a class.18 Kas 2019