Not all modifiers are applicable to all kinds of class declarations. The access modifier public pertains only to top level classes (�7.6) and to member classes (�8.5, �9.5), and is discussed in �6.6, �8.5 and �9.5. The access modifiers protected and private pertain only to member classes within a directly enclosing class declaration (�8.5) and are discussed in �8.5.1. The access modifier static pertains only to member classes (�8.5, �9.5). A compile-time error occurs if the same modifier appears more than once in a class declaration.
Hi Daniel, The access modifiers for top level classes are either public or default (no modifier). Static member classes and non-static inner classes can have the following accessibility modifiers: public, protected, private or default. Hope this helps. Sam
subject: Top level Class can be private,protected?