File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes extending class clarifications Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "extending class clarifications" Watch "extending class clarifications" New topic
Author

extending class clarifications

Randy Smith
Ranch Hand

Joined: Mar 27, 2011
Posts: 44

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

Legal



Illegal
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

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

Joined: Mar 27, 2011
Posts: 44
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

Joined: Aug 31, 2004
Posts: 11343

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.)


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: extending class clarifications
 
Similar Threads
super class, class
Constructor initialization
Please somebody explain
Inheritance with by Hibernate reverse engineering
Class Casting Question?