A top level type declaration declares a top level class type (§8) or a top level interface type (§9).
TypeDeclaration: ClassDeclaration InterfaceDeclaration
By default, the top level types declared in a package are accessible only within the compilation units of that package, but a type may be declared to be
public to grant access to the type from code in other packages (§6.6, §8.1.1, §9.1.1).
It is a compile-time error if a top level type declaration contains any one of the following access modifiers:
It is a compile-time error if the name of a top level type appears as the name of any other top level class or interface type declared in the same package.
It is a compile-time ...