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 inner classes Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "inner classes" Watch "inner classes" New topic
Author

inner classes

Marc Shiest
Ranch Hand

Joined: Jun 09, 2001
Posts: 46
hey my fellow Java Ranchers...what is the difference between a private inner class and a protected inner class?
Thanx
Mikael Jonasson
Ranch Hand

Joined: May 16, 2001
Posts: 158
The same as the difference between a private and a protected member variable: The acces to it.
If you declare an inner class to be private, the only methods that can acces methods within that class are methods of the class encapseling that class. If you use protected, subclasses of the encapusing class may access it.
/Mike
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: inner classes
 
Similar Threads
Question in K&B Book - protected class
Private
Inner Classes
Passing an object to a method.
Inner Classes