Is C++ the only major language that supports multiple inheritance? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 13

Is C++ the only major language that supports multiple inheritance?

Java has no multiple inheritance but has interfaces. Other newer languages also seem to support variations of interfaces but not multiple inheritance. Does anyone know of another major language that supports multiple inheritance? Did C++ get it wrong in supporting this concept. If so, why?

10th Sep 2018, 3:40 AM
Sonic
Sonic - avatar
3 Answers
+ 13
C++ allows you to shoot yourself in the foot. A byproduct of power is the ability to harm oneself, should a user be careless or unskillful. That said, multiple inheritance is not specific to C++. https://en.m.wikipedia.org/wiki/Multiple_inheritance
10th Sep 2018, 4:56 AM
Hatsy Rei
Hatsy Rei - avatar
+ 7
Thanks Hatsy Rei. So according to this, Python, Perl, Scala, Lisp, and Java SE9 seem to be the other major-ish languages that support it. Java SE9 was a surprise to me as I thought it was forbidden in Java.
10th Sep 2018, 6:36 AM
Sonic
Sonic - avatar
0
yes
16th Sep 2018, 6:17 AM
GUNDUMILLI HEMANTH KUMAR
GUNDUMILLI HEMANTH KUMAR - avatar