Code Conventions for the Java Programming Language

 


The information on this page is for Archive Purposes Only


This page is not being actively maintained. Links within the documentation may not work and the information itself may no longer be valid. The last revision to this document was made on April 20, 1999

 


   

This Code Conventions for the Java Programming Language document contains the standard conventions that we at Sun follow and recommend that others follow. It covers filenames, file organization, indentation, comments, declarations, statements, white space, naming conventions, programming practices and includes a code example. 

  • 80% of the lifetime cost of a piece of software goes to maintenance.
  • Hardly any software is maintained for its whole life by the original author.
  • Code conventions improve the readability of the software, allowing engineers to understand new code more quickly and thoroughly.

The Code Conventions for the Java Programming Language document was revised and updated on April 20, 1999.

Oracle is providing the legacy documentation here. Please use it with the Advisory Disclaimer that it is NOT up to date. The information provided is for archival purposes. It is not being actively maintained and therefore links in the documentation may be broken.

Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner Java 8 banner (182)