Java Language Oracle Official Code Standard Java Source Files


  • All lines must be terminated with a line feed character (LF, ASCII value 10) and not for instance CR or CR+LF.

  • There may be no trailing white space at the end of a line.

  • The name of a source file must equal the name of the class it contains followed by the .java extension, even for files that only contain a package private class. This does not apply to files that do not contain any class declarations, such as