jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Inner classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Inner classes" Watch "Inner classes" New topic

Inner classes

Arsho, Ayan
Ranch Hand

Joined: Nov 14, 2001
Posts: 60
Hello Everybody ,
Can a non-static inner classes be extended by other classes at all, I suppose static inner classes can be extended right??
Happy new Year
Michael Ernest
High Plains Drifter

Joined: Oct 25, 2000
Posts: 7292

Non-static inner classes are only defined by their presence in an enclosing instance. If there's a way to work that to meet your requirements, I haven't figured it out yet. Here's the easier case:

Happy New Year backatcha.
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
[This message has been edited by Michael Ernest (edited January 01, 2002).]

Make visible what, without you, might perhaps never have been seen.
- Robert Bresson
Jose Botella
Ranch Hand

Joined: Jul 03, 2001
Posts: 2120
here you can see Bruce Eckel guru doing just that:
A piece of advice. Never inherit an inner from the enclosing one

SCJP2. Please Indent your code using UBB Code
It is sorta covered in the JavaRanch Style Guide.
subject: Inner classes
It's not a secret anymore!