According to OOPS ( Object-oriented concept ) inheritance are classified into 6 category in which java support 5 of them and one is not supported in java i.e multiple inheritance for which there is a concept of interface . Interface is used to make JAVA support for multiple inheritance. The following 6 types of inheritance are as follows :-
Single Inheritance
Multiple Inheritance
Multi-level inheritance
Hierarchical Inheritance
Hybrid inheritance
Cyclic inheritance
1. Simple Inheritance
2. Multiple level inheritance ( Not supported in Java )
3. Multi-level inheritance
4. Hierarchical Inheritance
5. Hybrid inheritance
6. Cyclic inheritance ( Not supported in Java )
Single Inheritance
Single inheritance is a simple hierarchy of super and subclass. Here a subclass is extending its super class and super class is by default extending its super class i.e Object class. So if there is a single class the object class is the direct super class otherwise it will be the indirect super class.
In this type of inheritance we have more than one super class and only one subclass. and we are inheriting all the super class member in the sub-class and to achieve we need to extend all of these classes but unfortunately Java doesn't allow to extend more than one super class. This is why it is not supporting multiple inheritance but to achieve the same there is new concept of interface.
Multi-level inheritance
In multilevel inheritance we are following series of super and sub class relation but it is in a single level that means a subclass is extending only one super class but that super class is again extending another class. Like this it follows the chain of extending class one to another in a single level. So in this a class sometimes acts as a sub for its super class and sometimes acts as super class for its sub-class.
Hierarchical Inheritance
It is type of inheritance where we have one super class and more than one subclass. Here every subclass extending super class will able to access the member of its super class and note there is no inheritance relation between sub classes. Like if we have to use the member of the class into all other classes then hierarchical inheritance would be the best option.
Hybrid inheritance
It is a type of inheritance which is the combination of simple, multi-level and hierarchical inheritance. So by using hybrid we are going to use all the functionality of all other types of inheritance.
Cyclic inheritance
It is a type of inheritance in which a class extends it self and form a loop itself. Now think if a class extends it self or in any way if it forms cycle within the user defined classes then is there any chance of extending Object class ?
No then there is no chance of extending super class and hence not supported by Java.