Multiple Inheritance?

  • Differentiate between multiple vs. single inheritance.
  • Differentiate between multiple vs. multi-level inheritance.

Multiple inheritance is where one class has more than one super-class and inherits features from all parent classes.

Some programming languages, like C++ and Ruby, support Multiple Inheritance. Java, however, does not support multiple inheritance. Java does not permit you to extend more than one class. Although, a super-class itself may be a sub-class (of another class higher up in the hierarchy), allowing multi-level inheritance.

The reasons for not permitting multiple inheritance are primarily technical (compiler design) and, at this point, historical artifacts. You can refer to Oracle's Java Tutorial: Inheritance for their explanation of why Multiple Inheritance is not permitted.

Note that it is perfectly okay for a class to have multiple sub-classes.

Resources
  • TutorialsPoint has a well-written entry on inheritance, with a nice diagram for types of it, here.