multiple inheritance means code example

Example 1: how u can achieve multiple inheritances

Multiple inheritance in Java programming is achieved or 
implemented using interfaces. Java does not support multiple 
inheritance using classes.
In simple term, a class can inherit only one class and multiple 
interfaces in a java programs. In java terminology, we can say that

“A class can extend only one class but it can implement 
multiple interfaces.”

Example 2: Diamond inheritance

The "diamond problem" (sometimes referred to as the "Deadly Diamond of Death") is an ambiguity that arises when two classes B and C inherit from A, and class D inherits from both B and C
If there is a method in A that B and C have overridden, and D does not override it, then which class of the method does D inherit: that of B, or that of C?

Tags:

Misc Example