Type of Inheritance in Java

Advertisements

Java Types of Inheritance

Inheritance means access the properties and features of one class into another class. The class who is going to provide its features to another class will be called base class and the class who is using the properties and features of another class will be called derived class.

Java supports 3 types of inheritance as follows:

  • Single Inheritance
  • Multilevel Inheritance
  • Heirarchical Inheritance

Note: Java doesn't support multiple inheritance..

Java Single Type Inheritance

A derived class with only one base class is called single inheritance.


	

Java Miltilevel Type Inheritance

A derived class with one base class and that base class is a derived class of another is called multilevel inheritance.


	

Java Hierarchial Type Inheritance

Multiple derived classes with same base class is called heirarchical inheritance.


	

Advertisement