0
Why multiple inheritance does not work in java?
java
3 Answers
+ 11
Because in case two superclasses contain the same named method, which one should be used by the class that inherits from them both?
It is the so-called "diamond problem":
https://www.sololearn.com/discuss/800962/?ref=app
https://www.sololearn.com/discuss/435220/?ref=app
+ 1
It's a feature, not a bug. Multiple inheritance can create serious problems(look up the diamond problem). So it was intenionally forbidden in Java.
+ 1
you can do bunch of interfaces, that is allowed but inheritences? no. c++ can do bunch of inheritences though