In Java, Top level classes can have only package private and public modifiers.
Making a class private
doesn't make any sense. If no one use that class for any reason, then why we need that class?
protected
access modifier means, only visible within the enclosing class and any subclasses, and also anywhere in the enclosing class's package. No body knows which classes going to be subclass of a protected class. So, it also doesn't make sense
But both private and protected can be (and frequently are) applied to nested classes and interfaces, just never top-level classes and interfaces