aspose file tools*
The moose likes Beginning Java and the fly likes protected key word Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "protected key word" Watch "protected key word" New topic
Author

protected key word

Sanath Ramesh kumar
Greenhorn

Joined: Mar 13, 2012
Posts: 4
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

Joined: Jan 28, 2008
Posts: 5575

Please, SearchFirst
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14351
    
  22

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?


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 8 API documentation
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: protected key word