Home / Object Oriented Programming / Define Inheritance. Classify Inheritance

Define Inheritance. Classify Inheritance

Define Inheritance. Classify Inheritance

Inheritance is the process of creating new class from existing class. There are 5 types of inheritance.

  • Single inheritance
  • Multiple inheritance
  • Hierarchical inheritance
  • Multiple inheritance
  • Hybrid inheritance

Single inheritance: One child class inherits from one parent class.

Multilevel inheritances:   The parent class for one is the child class for another.

Hierarchical inheritance: In the root of inheritance, multiple child class inherits from one parent class.

Multiple inheritances: A single child class can have multiple parent classes.

Hybrid inheritance: Hybrid inheritance is a combination of more than one type inheritance.