+ 5
In java why we can't perform multiple inheritance? It is possible by using interface only not directly why??
3 Réponses
+ 3
because of the "diamond of death"
https://en.m.wikipedia.org/wiki/Multiple_inheritance
+ 8
Java does not support that because if you have 2 classes with the same method signature and then you "extend" both classes in your class, and then you try to instantiate an object of that class calling the method in both extended classes, the JVM have no way to know which one is the one you want, that's call the diamond problem.
+ 6
super