Possible Duplicate:
Why there is no multiple inheritance in Java, but implementing multiple interfaces is allowed
hi all, I am new to java and when I am try to use multiple inheritance concept in java its showing a compile time error.Why java does not support it.I heard about interface key word but do not know why java support it directly. please help me in this and explain.
The main problem with multiple inheritance (alluded to by Colin and Rin) is known is The Diamond Problem.
I quote:
The 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 the method), and B and C have overridden that method differently, then from which class does it inherit: B, or C?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With