The problem about java multiple inheritance
-
:) Hi, everyone May I ask a questions?? C++ is my first language but I now I need to learn Java. C++ supports multiple inheritance. Example: Class c Protected class a(), class b() { } But Java doesn't support multiple inheritance. Java use interface to implement multiple inheritance. My question is how to use interface to achieve multiple inheritance. Thank you very much.
-
:) Hi, everyone May I ask a questions?? C++ is my first language but I now I need to learn Java. C++ supports multiple inheritance. Example: Class c Protected class a(), class b() { } But Java doesn't support multiple inheritance. Java use interface to implement multiple inheritance. My question is how to use interface to achieve multiple inheritance. Thank you very much.
-
tzungshian wrote:
Java use interface to implement multiple inheritance.
No it does not, Java does not support multiple inheritance. See Why Multiple Inheritance is Not Supported in Java - Java Tutorial Blog[^].
Thank you very much!!!