Source Files : Java Source « Java Source And Data Type « SCJP






All Java source files must end with the .java extension. 
A source file should contain one top-level public class.
If a public class is present, the class name must match the unextended filename.
A source file may contain an unlimited number of non-public classes.
A file can have only one package statement, but multiple imports.








1.1.Java Source
1.1.1.Source Files
1.1.2.Three top-level compilation units may appear in a file.
1.1.3.Three top-level compilation units are not all required.
1.1.4.If three top-level compilation units are present, then they must appear in the following order