A JAVA program file can only contain one public java class and this should be named the same as the java file itself.
There can be any number of classes with / without other modifiers.
Classes without any modifiers will get compiled even if the name of the class does not match the name of the java program file.
(more…)