When the public access modifier is applied to a standard outer class, the following access is granted:
Full access is granted to inherit the class from within the same package or from any other package.
Full access is granted to create a new reference to an instance from within the same package or from any other package.
A source code file (.java) can contain a maximum of one public class and the name of the source code file must be the name of the public class. Other default access classes can exists in the same file.
It is very important to understand that applying public access to a class declaration does not set or change the access of the members and elements enclosed inside of the class.