Summary
Published online by Cambridge University Press: 07 September 2010
Summary
Adhere to the style of the original.
Adhere to the Principle of Least Astonishment.
Do it right the first time.
Document any deviations.
Indent nested code.
Break up long lines.
Include white space.
Do not use “hard” tabs.
Use meaningful names.
Use familiar names.
Question excessively long names.
Join the vowel generation.
Capitalize only the first letter in acronyms.
Do not use names that differ only in case.
Use the reversed, lowercase form of your organization's Internet domain name as the root qualifier for your package names.
Use a single, lowercase word as the root name of each package.
Use the same name for a new version of a package, but only if that new version is stillbinary compatible with the previous version, otherwise, use a new name.
Capitalize the first letter of each word that appears in a class or interface name.
Use nouns when naming classes.
Pluralize the names of classes that group related attributes, static services, or constants.
Use nouns or adjectives when naming interfaces.
Use lowercase for the first word and capitalize only the first letter of each subsequent word that appears in a method name.
Use verbs when naming methods.
Follow the JavaBeans™ conventions for naming property accessor methods.
Use lowercase for the first word and capitalize only the first letter of each subsequent word that appears in a variable name.
Use nouns to name fields.
[…]
- Type
- Chapter
- Information
- The Elements of Java™ Style , pp. 95 - 104Publisher: Cambridge University PressPrint publication year: 2000
- 1
- Cited by