File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes protected class ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "protected class ???" Watch "protected class ???" New topic
Author

protected class ???

Prashanth Lingala
Ranch Hand

Joined: Nov 13, 2004
Posts: 66
Why we cannot have a class as protected???


Have A Nice Day !!!
Mike Gershman
Ranch Hand

Joined: Mar 13, 2004
Posts: 1272
Nested classes can be protected.

If you look at the rules for accessing a protected entity from outside the same package, you'll see that they just wouldn't apply to a top level class. So the access choices for a top level class are public and default (package).


Mike Gershman
SCJP 1.4, SCWCD in process
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: protected class ???
 
Similar Threads
Question on protected access modifier
protected member
WA #1.....word association
protected class
private and protected class - why not?