Why does Java not allow a top level class to be declared as private? Is there any other reason other than \"We can\'t access a private class\"?
You cannot define a top level class private (or anything else besides public). You will get a compilation error.
Something.java:6: error: modifier private not allowed here
private class Something {
^
1 error
You have only two options, public or no access modifier at all. By omitting public you, implicitly, limit class access to within the package (aka: package-private).