Does Java support multiple inheritance?

Options
- No
- Yes


CORRECT ANSWER : No

Discussion Board
Multiple Inheritance

Java doesn't support multiple inheritance due to its simplicity. For example consider there are two classes B and C inheriting from A.
Now B and C consists of an overrided inherited method and they provide their own implementation for it.
Suppose D is another class inherits from both B and C using multiple inheritance then D should also inherits the overridden method but the confusion it will have that which overriden method it should involve which leads to the ambiguous case.

In C++ this kind of trap that a class can get into but there is no scope of occurrence in Java as there is no multiple inheritance. All the communication takes place with the help of interfaces in Java.

Rohit Sharma 08-6-2014 05:41 PM

should be yes ?

Why "no ?" ..what about inheriting from multiple interfaces ?

ali 12-7-2013 05:01 PM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement