Below are the different types of inheritance which is supported by Java.
- Single Inheritance
- Multiple Inheritance (Through Interface)
- Multilevel Inheritance
- Hierarchical Inheritance
- Hybrid Inheritance (Through Interface)
In Multilevel Inheritance sub class will be inheriting a parent class and as well as the sub class act as the parent class to other class. Lets now look into the below flow diagram, we can see ClassB inherits the property of ClassA and again ClassB act as a parent for ClassC. In Short ClassA parent for ClassB and ClassB parent for ClassC. [Read more…]