Types of inheritance in java

On the basis of class, there can be three types of inheritance in java: single, multilevel and hierarchical. In java programming, multiple and hybrid inheritance is supported through interface only. We will learn about interfaces later.

Figure 4.13: Types of inheritance
Image typesofinheritance

When one class inherits multiple classes, it is known as multiple inheritance. For Example:

Figure 4.14: Multiple inheritance
Image multiple



Subsections