my dog learned polymorphism*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Class modifiers 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 » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Class modifiers" Watch "Class modifiers" New topic
Author

Class modifiers

Purushottam Nawle
Greenhorn

Joined: Feb 17, 2005
Posts: 1
I am not able to get why we cann,t declare a class with private or protected modifer.
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
You can, as long as it is not a top-level class.
Neither of those modifiers make any sense on a top-level class.

Can you define how a private or protected top-level class should behave with respect to access?


Tony Morris
Java Q&A (FAQ, Trivia)
 
jQuery in Action, 2nd edition
 
subject: Class modifiers
 
Similar Threads
Doubt about diagram class (realization)
Private Constructor
regard on k&b book
about arrays
Doubt about diagram class