0
Why the multiple inheritance doesn't supported in java?
C++ , Common lisp and few other languages supports multiple inheritance while java doesnāt support it. It is just toĀ remove ambiguity, becauseĀ multiple inheritanceĀ can cause ambiguity in few scenarios. One of the most common scenario isĀ Diamond problem.
1 Answer
+ 1
However it's possible to implement multiple interfaces with "implements" keyword.
Commonly you need only properties of a super class but you need many methods who does different stuff, that are in different interfaces.
Inherit from a class if you need to declare "how it is" a class (what properties must have).
Implement interfaces to declare "what does" that class.
For example a Dog is only an Animal (extends) but it can Bark (implements Barkable(???)) and it can walk (Walkable) and so on.



