This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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 Head First Android 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)
 
 
subject: Class modifiers
 
jQuery in Action, 3rd edition