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 classes of exceptions may be caught by a catch clause in java programming?
Which is dependent variable?
What are singleton services?
Where is jre installed?
What is ascii format?
Can a source file contain more than one class declaration?
What is an array and a vector? How they different from each other?
What modifiers are used for interface declaration?
What is %d in printf?
why java does not support multiple inheritance
41 Answers Diamond, Euclid, Evergent, KLKJ, Mind Tree, NIIT, SSI Small Scale Industries, Wipro,
Why unicode is important?
Can we convert integer to string in java?