Multiple Inheritence

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Sep 2006
Posts: 30
Reputation: sarath.koiloth is an unknown quantity at this point 
Solved Threads: 0
sarath.koiloth's Avatar
sarath.koiloth sarath.koiloth is offline Offline
Light Poster

Re: Multiple Inheritence

 
0
  #11
Sep 30th, 2009
Originally Posted by JamesCherrill View Post
That's part pf the language definition. If you don't specify an "extends" then your class extends Object. It's built into the compiler.
even if we specify extends to other class.It extends to object class.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 1,027
Reputation: JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice JamesCherrill is just really nice 
Solved Threads: 151
JamesCherrill JamesCherrill is offline Offline
Veteran Poster

Re: Multiple Inheritence

 
0
  #12
Sep 30th, 2009
I'm not sure what distinction you are trying to make here. A class can only extend one class. That class, in turn, can only extend one class, etc all the way to Object.
Consider

class A {...}
which is exactly the same as
class A extends Object {...}
then
class B extends A {...}
class C extends B {...}
...
class Z extends Y {...}

It would be totally misleading to say "class Z extends Y and Object" without mentioning B..Y
Reply With Quote Quick reply to this message  
Reply

Message:



Similar Threads
Other Threads in the Java Forum


Views: 354 | Replies: 11
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC