Multiple Inheritance in Java

(Last Updated On: February 28, 2019)

Learn multiple inheritance in java using interface with example programs – Multiple inheritance  can be implemented using interfaces not classes.

Note that java does not support multiple inheritance using classes. But, we can achieve it using interfaces.

In other words, in Java, a class can extend only one class but can implement multiple interfaces. Recommended to read the following topics before moving further.

 

Multiple inheritance in Java using interface

Below is very simple java program. In this java program, Bird class will extend one class (Color) and achieve multiple inheritance behavior by implementing two interfaces i.e. IFlyable and IEatable .

 

Output: Bird eats Bird flying Green…