File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inner classes

 
Marc Shiest
Ranch Hand
Posts: 46
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey my fellow Java Ranchers...what is the difference between a private inner class and a protected inner class?
Thanx
 
Mikael Jonasson
Ranch Hand
Posts: 158
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic