permaculture playing cards
The moose likes Beginning Java and the fly likes Multiple inheritance. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Multiple inheritance." Watch "Multiple inheritance." New topic

Multiple inheritance.

T sandya
Ranch Hand

Joined: Aug 03, 2006
Posts: 64
I have two classes, Class A and Class B.
Class A is implicitly extending the Class Object.
Now if Class B extending the Class A, Class B also extending the Object Class, so it is violating the multiple
inheritance concept in java right?
how it is possible.?
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14998

No, multiple inheritance is extending two classes at the same level. In your example, the base classes are not at the same level.

Please do a search for "multiple inheritance" in the forums here; this topic is discussed regularly here, and your question has been asked often. If you do a search you will find a list of answers very quickly.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
I agree. Here's the link:
subject: Multiple inheritance.
It's not a secret anymore!