Is multiple inheritance allowed in Java? Why ?

Answer Posted / shivaprasad

Multiple inheritance is not allowed in java because it creates
DIAMOND PROBLEM.
DIAMOND PROBLEM: Suppose classes B and C extend A and
class D extends to both B and C(multiple inheritance). Now,
if D calls a method in A then it does not know from which
class it has to inherit(either B or C). This is called
diamond problem.

Is This Answer Correct ?    8 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a function in programming?

533


Why can we not override static method?

565


What is difference between float and double?

479


What is hashtable and explain features of hashtable?

539


Does A Class Inherit The Constructors Of Its Superclass?

518






What is abstract class? Explain

575


What is the r character?

566


How do you compare objects in java?

472


Is Constructor possible in abstract class in java ?

567


Can list be null in java?

547


What is garbage collection? What is the process that is responsible for doing that in java?

624


Can inner class extend any class?

575


How do you download stubs from Remote place?

1326


What do you understand by java?

538


What is private protected in java?

527