| Author |
inheritence
|
karthika gkumar
Greenhorn
Joined: Apr 15, 2008
Posts: 6
|
|
in java all the classes are extend with Object class implicitly. java does not support multiple inheritence. but when we are extending a class with some other class doesnt that mean that class is extended twice?
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24061
|
|
Hi, Welcome to JavaRanch! Multiple inheritance specifically means inheriting from several classes directly. A class can have only one direct parent class. The fact that the parent has its own parent doesn't matter.
|
[Jess in Action][AskingGoodQuestions]
|
 |
abhishek pendkay
Ranch Hand
Joined: Jan 01, 2007
Posts: 184
|
|
karthika
in java all the classes are extend with Object class implicitly.
the correct statement would be in java all classes that do not extend from any other class extend from the Object class so if your class in extending from some other class it will not directly extend from Object... so there is no multiple inheritance problem.. [ April 18, 2008: Message edited by: abhishek pendkay ]
|
The significant problems we face cannot be solved by the same level of thinking which created them – Einstein
SCJP 1.5, SCWCD, SCBCD in the making
|
 |
karthika gkumar
Greenhorn
Joined: Apr 15, 2008
Posts: 6
|
|
|
thank you
|
 |
Kuldeep Singh
Greenhorn
Joined: Apr 20, 2008
Posts: 3
|
|
Hidear I would like to add some more. it is called maultilevel inheritence which you are explnig exctly. when we say multiple that means extends morethen oneclass. as you may see in C plus plus. if we extend two class to one single class by extending 2-times then it is not not fair. [ April 21, 2008: Message edited by: Kuldeep withDreams ]
|
Regards,<br />kuldeep<br /> <br />May be.!! Alot of People are responsible for your Success but you are the ONE responsible for your FAILURE.
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
"Kuldeep", Please check your private messages. -Ben
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
 |
|
|
subject: inheritence
|
|
|