+ 1
Why is multiple inheritances not supported in Java ?
3 Réponses
+ 7
Multiple inheritance can cause the diamond problem.
What is the diamond problem?
https://en.m.wikipedia.org/wiki/Multiple_inheritance#The_diamond_problem
Since Java 8, the diamond problem can still exist via interfaces. However, it is what likely influenced the decision by developers to not make the language support multiple inheritance.
+ 3
makes java easier to understand im sure you can do this in c++
+ 1
The main point to be discussed over here is Java does not support multiple inheritance or Java does support? There are lots of people who are still under confusion that it supports but actually it does not support using interface in Java. Even the father of Java has once admitted the fact.
Most of the developers actually projected a false story about the support of multiple inheritance. When compared to concrete classes interface gives flexibility and using single class multiple interfaces can be implemented.
With the help of this you actually get closer to multiple inheritance. The main thing actually done is implementing multiple interfaces and that is not to be done in terms of extending anything or inheriting anything. For including the behaviors and properties of implementing the class there is no free seeking of implementation from parent classes.
Read here in detail:- http://crbtech.in/Java-Training/java-doesnt-support-multiple-inheritance/