Java class modifier: The public adornment is typically used, at which point Java enforces the requirement. The Java file name must match the public-decorated class name, otherwise it cannot be compiled. If there is no modifier, the file name is not associated with the class name.
The. Java file recommends declaring only a single class and not creating multiple classes in the same class file.
When path is added, the rotation is added at the top of the current path, preventing the intermediate directory impact.
CLASSPATH When you run the program for the Java command, look for the. Class path, when you add CLASSPATH. Represents the current directory.
When you add project using idea, you configure the project SDK version, and the project compiles the file directory (when creating project, it is recommended to create an empty project, otherwise a module with the same name will be added automatically.) New Empty project, add module, current module does not show out folder)
Java Foundation: Java file name and class name relationship CLASSPATH