Why multiple inheritance is not supported by Java?


Multiple inheritances lead to ambiguity.

For example, if there is a class named Sub and there are two classes Super1 and Super2 and if both contains a method named sample().

 And if the class sub inherits both classes Super1 and Super2 then there will be two copies of the sampling method one from each superclass and it is ambiguous to decide which method to be executed.

Updated on: 16-Jun-2020

6K+ Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements