Fusion Practices interview question

Why Multiple inheritance is not used in Java.

Interview Answer

Anonymous

18 Jun 2024

Because of Diamond problem, the diamond problem occurs when a class inherits from two classes that have a common base class. If both parent classes provide an implementation of the same method, it becomes ambiguous as to which method should be inherited by the subclass. This can lead to conflicts and inconsistency in behavior.