Java Source Files
suggest change- The Java language accepts CR, LF, and CR+LF as line terminators. A project may still require LF only.
- Trailing white space is allowed. Some projects forbid it.
- If a file declares a public top-level type, the file name must be that type’s name plus
.java. A package-private type does not have to match the file name.package-info.javaholds a package declaration and may contain no type.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents