Oracle Official Code Standard
suggest changeIntroduction
The OpenJDK Java Style Guide draft is a style guide for the Java programming language. It covers filenames, file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices, and includes a code example.
Remarks
- The examples above strictly follow the OpenJDK Java Style Guide draft. They are in other words not subjectively made up by the authors of this page.
- The draft has been carefully written to be backward compatible with the original Oracle code conventions and the majority of code out in the wild.
- The draft has been peer reviewed by, among others, Brian Goetz (Java Language Architect) and Mark Reinhold (Chief Architect of the Java Platform).
- The examples are non-normative. While they intend to illustrate the correct way of formatting the code, there may be other ways to correctly format the code. This is a general principle: there may be several ways to format the code, all adhering to those guidelines.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents