why java does not support multiple inheritance
Answer Posted / sskur
To say why java doesn't support inheritance directly like c++
should be the diamond problem faced by c++,
(Diamond problem is an ambiguity that arises when 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 it), and B and C have overridden that
method differently, then via which class does it inherit: B,
or C?)
| Is This Answer Correct ? | 206 Yes | 22 No |
Post New Answer View All Answers
What is null data type?
How do you escape json?
Give reasons supporting that string is immutable.
Is there any difference between nested classes and inner classes?
Why is method overloading not possible by changing the return type in java?
What is the loop in java?
What are the skills required for core java?
What is the use of default method in interface in java?
What is the difference between checked exception and unchecked exception?
What is a method signature java?
What is difference between local variable and global variable?
Explain what access modifiers can be used for variables?
How to retrieve data from database in java using arraylist?
What is difference overloading and overriding?
What is gc()?