adspace


What are the different approaches to represent an inheritance hierarchy?

Answer Posted / Kamlesh Yadav

In Java, there are three main approaches to representing inheritance hierarchies: single inheritance, multiple inheritance (using interfaces), and hierarchical inheritance. Single inheritance involves one superclass and one subclass. Multiple inheritance involves a class inheriting from multiple interfaces or multiple classes using C++-style multiclass inheritance. Hierarchical inheritance, also known as inheritance with multiple parents, involves a common superclass shared by multiple subclasses.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

No New Questions to Answer in this Category !!    You can

Post New Questions

Answer Questions in Different Category