• Post Reply Bookmark Topic Watch Topic
  • New Topic

Access Modifiers

 
rajani peddi
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

Top level classes can be declared as public or they can be default. They can't be protected. Why is this so? When they can have default access modifier(friendly) which is more restricted than protected why can't they have their access modifier as protected?
rajani
 
bill bozeman
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am moving this to Programmer Certification Study as it is more suited to that area as opposed to Mock exam erratas.
Bill
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!