posted 20 years ago You're right...sort of (only partway). Whether you specify it explictly or not, any class you create is a subclass of Object. So say you do this:
And then you do this:
You're right in saying that Dog is a subclass of Animal and Object. But you're forgetting that what you really wrote was this:
It extends Object whether you say it does or not. So you have:
Object
|
Animal
|
Dog
So Object is Dog's grandparent, and Animal is Dog's parent. In other words, Dog isn't extending from two different parents...you get me? If you want to try to get some benefits of multiple inheritance, look into implementing multiple interfaces...
[ February 03, 2005: Message edited by: Stephen Huey ]