On a specific Interview i have been asked this question and till now i dont have any answers to get this one correctly / perfectly.
Q >> By default every class in Java inherits the "OBJECT" class , so any class is extended by this "OBJECT" class. If i try to extend some other class i think it is extended twice? Is this not multiple inheritance.
Eg: MyClass extends ParentClass (also extends Object class by default). How this is managed / Or is this exceptional / How does JVM support only this inheritance?
Strictly speaking Don is right, you can only specify one class after the extends keyword.
But when you add interfaces into the mix it is possible to engage in multiple "contracts" - similar in many ways to extending several abstract classes that have abstract methods with no implementation.
I've seen many a thread of discussion on Java multiple inheritance !
Java supports multiple inheritance in interfaces but not in implementations. If asked why no multiple inheritance of implementations, then the answer is simply "simplicity". Java follows the age of C++, but is a stickler for OOP principles. Creators of Java wanted to get rid of the complexity of multiple inheritance (of implementations) that is inherent in C++.