These two facts in java
Fact 1
“Every class in java by default extends the java meta class Object
”
and
Fact
Yes, both the statements are correct.
It’s true that every class in java extends the meta class Object
.
Still ClassB doesn’t have multiple inheritance because at compile time java shifts the Object
Class by one level.
This way now ClassA
now extends Object
and not ClassB
.
This way ClassB
is not having multiple inheritance so fact2 is followed.
Now ClassB
extends ClassA
and ClassA
extends Object
thus through MultiLEVEL Inheritance ClassB extends Object
; fact1 followed