• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Class modifiers

 
Purushottam Nawle
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to get why we cann,t declare a class with private or protected modifer.
 
Tony Morris
Ranch Hand
Posts: 1608
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic