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


Please Help Members By Posting Answers For Below Questions

Can you pass by reference in java?

736


What is structure of java heap? What is perm gen space in heap?

787


Is arraylist ordered?

785


What is the biggest integer?

812


What are the different ways of creating thread?

795


Write a program to check for a prime number in java?

798


How do you identify independent and dependent variables?

737


How can we pass argument to a function by reference instead of pass by value?

837


What is bitwise complement?

728


What is the final access modifier in java?

824


Is set thread safe java?

707


Can static methods access instance variables in java?

795


What is difference between hashset and hashmap in java?

706


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

811


What is math exp in java?

789