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

What is difference between arraylist and list in java?

585


What is the difference between object oriented programming language and object based programming language?

560


How does compareto work in java?

583


Why use string handling in Java?

583


What is anonymous inner class?

613






What is thread synchronization in java?

485


What are data types in programming?

553


How can we find the sum of two linked lists using stack in java?

574


How do you access command-line arguments within the code?

573


What is integer size in java?

514


When super keyword is used?

600


What is the longest unicode character?

695


How to sort elements in a parallel array in java?

508


What is java and why do we need it? Explain

585


Can a static class implement an interface?

562