Can you explain the different types of inheritance, single, multilevel, hierarchical, and hybrid?

Last updated 5 July 2026

These are classifications of how classes derive from one another. Single, multilevel, and hierarchical describe the shape of the class tree, while hybrid combines several forms (often involving multiple inheritance).

  • Single inheritance: One subclass derives from one superclass (B extends A).

  • Multilevel inheritance: A chain of derivation (C extends B, B extends A), so each level adds specialization.

  • Hierarchical inheritance: Multiple subclasses derive from one common superclass (B and C both extend A).

  • Hybrid inheritance:

    • A mix of two or more of the above, frequently combined with multiple inheritance (a class with more than one parent).

    • Can produce the diamond problem, where an ambiguous inherited member comes from two paths.

  • Language note: Java and C# disallow multiple class inheritance (so pure multiple/hybrid needs interfaces); C++ and Python support it directly.

  • https://dev.to/karthick_karthick_bf8338d/inheritance-in-java-types-examples-advantages-and-complete-guide-for-beginners-39g4
  • https://blog.devgenius.io/inheritance-in-c-8c1b715f157a
  • https://www.geeksforgeeks.org/cpp/cpp-multilevel-inheritance/
  • https://www.freecodecamp.org/news/how-to-solve-multiple-inheritance-in-java/
  • https://dilushasandaruwani07.medium.com/inheritance-types-in-oop-dca850360319
  • https://www.geeksforgeeks.org/c-sharp/c-sharp-inheritance/
  • https://blog.stackademic.com/understanding-inheritance-and-its-types-with-examples-a6cd5615bdea
  • https://medium.com/@shraddhazladhe/understanding-software-architectures-oops-concepts-inheritance-in-java-e566fa235feb
All Object-Oriented Programming interview questions