if u have noticed u can't even specify keyword PRIVATE before a class name. giving a PRIVATE or PROTECTED specifier to a class name is of no meaning!! its simple there r only two options, either u will be using ur class within the same package or outside in a different package. In the former case NO specifier is required and in the latter case, using PUBLIC specifier will work. so whats the need for others!!!
The actual answer to this (very good question) is that the JVM has needs in addition to those of us poor programmers. One thing that the JVM does is to create a "ClassFile Structure" for each class that holds all the stuff that the JVM needs to know about the class. In this ClassFile Structure is an access_flags set of switches. One of those switches is dedicated to
ACC_PUBLIC 0x0001 = Declared public; may be accessed from outside its package.
Notice that this is a ONE BIT switch. It must be either ON or OFF. None of this "Well yeah any one in the package OR any subclass outside the package or . . . " stuff. Nope, it thinks in black and white. "Can anyone outside this package get at me - yes or no?
However - You don't really have a problem here. Getting at a class is useless unless you can MAKE an instance of the class or USE the static stuff of the class. If you want to change the accessibility of a class, you change the access modifier on the constructor(s) and/or the access modifiers on the static variables and static methods themselves. Therefore you always have the option of making the class public and restricting it's use. Doing it this way provides all the flexibility in restrictions that you might need.
"JavaRanch, where the deer and the Certified play" - David O'Meara