• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

extending class clarifications

 
Randy Smith
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Thanks for responding. While i understand multiple classes inheritance is not legal, but can I confirm cascading inheritance is fine?

Legal



Illegal
 
Paul Clapham
Sheriff
Posts: 20990
31
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure, go ahead. You can confirm it by seeing what the compiler does when you ask it to compile those pieces of code.
 
Randy Smith
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Sure, go ahead. You can confirm it by seeing what the compiler does when you ask it to compile those pieces of code.


I have already confirm that cascading inheritance is fine. just want to reconfim this. Thanks!
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.

Consider that you are already doing this whenever you extend another class, because java.lang.Object is at the top of the hierarchy. (See Java Tutorial - Subclasses.)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic