0

Does Hybrid Class (multi-inheritence) concept exist in Java like in C++ and D? Why?

Hybrid; Multi-Inheritence; C++; D

21st Aug 2016, 12:02 PM
Moez Hammami
4 Réponses
+ 1
in java you don't need Hybird , in case just import and use the methods you want , in real world every man has only one parent .
8th Sep 2016, 8:08 AM
kareem kassem
kareem kassem - avatar
0
No, it doesn't.
21st Aug 2016, 1:10 PM
Zen
Zen - avatar
0
Why Java does not support Multi-inhertence (Hybrid) concept?
21st Aug 2016, 1:39 PM
Moez Hammami
- 1
Hybrid is not supported due to ambiguity unless you work around it with interfaces. Incase you don't know what is meant by ambiguity, I'll explain. If you have a parent class with a method, and two child classes that override that method, then have another child class that extends both the previous child classes, the program wouldn't know which method to run.
21st Aug 2016, 3:45 PM
James
James - avatar