Introductory Java Coding Guidelines, Version 1.6
 

I. Thou shalt begin class names with uppercase letters, but thou shalt NOT begin variable names or method names with uppercase letters.

II. Thy identifiers shalt be meaningful.

III. Thou mayest use a mixture of uppercase and lowercase characters in identifiers that are composed from multiple words, e.g., "nameOfAuthor", or thou mayest use underscores, e.g., "name_of_author. Thou shalt NOT use identifiers composed of multiple words in all lowercase without separation, e.g., "nameofauthor".

IV. Thou shalt use all uppercase for defined constants, e.g.,
        final double PI = 3.14159;

V. Thou shalt indent thy code so that thy descendants can read and understand it, yea, even to the third and fourth generation.

VI. Thou shalt align closing braces with the start of the line before the matching opening brace.

VII. Thou shalt include comments at the beginning of main or any significant method to identify thy module's author, the date of its writing, and its general purpose. Thou shalt use thy common sense to know when to include comments to explain the purpose of any code that is not obvious to the casual observer upon inspection.

VIII.  Thou shalt NOT declare unnecessary constants nor variables. Yea, thou shalt avoid unnecessary code of all kinds, lest thy code become cluttered and unreadable.

IX. Thou shalt consider using comments to identify the end of a compound statement, e.g.,
        } // end main

X.  Modularity and stepwise refinement shalt be thy guiding principles, and thou shalt not design monolithic programs devoid of structure and logical clarity.

XI. One guideline is to be honored and revered above all others:

        THOU SHALT FOLLOW INSTRUCTIONS!