What is the reason that multiple inheritance is not possible
in java??



What is the reason that multiple inheritance is not possible in java??..

Answer / gayathri

This is to avoid "Diamond problem"....Lets say there are 4 classes A,B,C,D..A is a superclass...The two classes B and C inherit from A, and class D inherits from both B and C. If a method in D calls a method defined in A (and does not override the method), and B and C have overridden that method differently, then from which class does it inherit: B, or C? ...To avoid this issue, Java dint allow multiple inheritance..
Having said that, also note that Java allows multiple inheritance through multiple interface implementation

Is This Answer Correct ?    10 Yes 1 No

Post New Answer

More Core Java Interview Questions

What is the immediate superclass of the Dialog class?

2 Answers  


How many types of methods are there?

0 Answers  


Why do we use string?

0 Answers  


Explain importance of inheritance in java?

0 Answers  


Is empty in java?

0 Answers  






What is a java object and java application?

0 Answers  


What is thread start?

0 Answers  


How does JAVA ClassLoader work?

1 Answers   IBM,


When finally clause is executed?

3 Answers  


What is tcp and udp?

0 Answers  


What is null in java?

0 Answers  


Explain the use of shift operator in java. Can you give some examples?

0 Answers  


Categories