• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

protected key word

 
Sanath Ramesh kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why cant protected access specifier could be given to a top level class even though it comes second in the hierarchy(1.public 2.protected 3.default 4.private).It is allowed to use default though it stands 3rd in the hierarchy??
 
Seetharaman Venkatasamy
Ranch Hand
Posts: 5575
Eclipse IDE Java Windows XP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please, SearchFirst
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15356
39
Android IntelliJ IDE Java Scala Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll ask you a question back which will make clear why you can't make a top-level class protected: What do you think it would mean if a top-level class is protected?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic