I know that Java doesn't support multiple inheritance. Every class in Java inherits from java.lang.Object
class. In the absence of any other explicit super class, every class is implicitly a subclass of java.lang.Object
class.
So how is it possible for a class to inherit from java.lang.Object
and another explicit super class when Java doesn't support multiple inheritance?
For example
class MySuperClass {
//this is the explicit super class
}
class MySubClass extends MySuperClass {
// this is the subclass
}
How can MySubClass
inherit from java.lang.Object
and MySuperClass
when Java doesn't support multiple inheritance?