Chirag Sharma wrote:So its looks like a multiple inheritence...
No it doesn't. Where does it say
class B extends Object
?
The fact is that class B
extends class A,
which in turn extends Object - which means that class B
is-a A, and since class A
is-a Object, it follows that class B
is-also-a Object, but that's not the same thing as multiple inheritance.
Don't you think it would be kind of silly if inheritance only allowed you to create hierarchies that were two-deep? Since, as you've already worked out,
everything basically extends from
Object, that would rule out hierarchies altogether, wouldn't it?
Winston