This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Inner classes within inner classes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Inner classes within inner classes" Watch "Inner classes within inner classes" New topic
Author

Inner classes within inner classes

Leo Velazquez
Greenhorn

Joined: Apr 27, 2006
Posts: 13
If C is a regular(non method local) inner class of B and B is an inner class of A, does C have direct access to A's private fields just as B does?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36575
    
  16
Have you tried it?
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi Leo,

You can match your case with the following code:





Regards,
cmbhatt


cmbhatt
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Inner classes within inner classes
 
Similar Threads
JavaCap Mock Exm Doubt
Inner classes and inheritance
Static Inner Class Question
question about static inner classes
Inner Classes