Multiple inheritance in Java is not supported? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

Multiple inheritance in Java is not supported?

"Languages that support multiple inheritance include: C++, Java (Java SE 9 [4]), Common Lisp (via Common Lisp Object System(CLOS))..." - Multiple inheritance , source wikipedia. Is this just another wrong info from wikipedia or am I missing something?

21st Sep 2018, 7:57 PM
voja
voja - avatar
4 Answers
+ 4
Voja upon further research i found 2 things: the multiple inheritance in java SE 9 is actually just making interfaces more like abstract classes, so it's not complete multiple inheritance. second, java SE 9 is an unsupported version of java. the current ones in use are 8 and 10. so the answer to "does java support multiple inheritance" is still technically no, as a class cannot inherit from any other given class.
21st Sep 2018, 9:24 PM
hinanawi
hinanawi - avatar
+ 6
hinanawi well i had this question (does java support multiple inheritance?) in challenges and the correct answer was IT DOESN'T SUPPORT IT, they didn't specifiy version of java. I know Java allows to iherit multiple interfaces but it doesn't allow multiple classes. But it seems it is possible. So confusing... stack overflow, quora and others say it's not possible (answers from 2017/18, though they didn't specify version). I will google it later again...
21st Sep 2018, 9:18 PM
voja
voja - avatar
+ 5
hinanawi thank you 😊
21st Sep 2018, 9:29 PM
voja
voja - avatar
+ 1
Java SE 9 supports it, most other versions do not.
21st Sep 2018, 8:56 PM
hinanawi
hinanawi - avatar