Multi-Level Inheritance in Java with Program Example

In this java tutorial, we will understand the working of multi-level inheritance in java with a program example. Multi-level inheritance can be considered as a addon to single inheritance as in this type we have more than one level of inheritance (shown in the diagram below). We have a complete explanation of Inheritance in Java so if you don’t know what Inheritance in Java is then check this article out.

In multi-level Inheritance, we have a single Super Class and a subclass1(level1) which inherits the properties directly from the Super class & then we have one more subclass2(level2) which  inherits the properties directly from the subclass 1 class.

multilevel inheritance in java

Java Multi-Level Inheritance Program Example –
Output
SuperClass
SubClass1
SubClass2

Leave a Reply

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