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 |
What should I import for arraylist in java?
what are different ways in which a thread can enter the waiting state? : Java thread
What happens to a static var that is defined within a method of a class?
What are the limitations of procedural programming approach?
What is generic class?
What does string intern() method do?
What is the Scope of Static Variable?
What is stream api in java8?
Is multiple inheritance supported by java?
What’s the difference between callable and runnable?
Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?
0 Answers Akamai Technologies,
Which java.util classes and interfaces support event handling?