next up previous
Next: Blank spaces Up: White Space Usage Previous: White Space Usage

Blank lines

Blank lines can improve readability by grouping sections of the code that are logically related. A blank line should also be used in the following places:
  1. After the copyright block comment, package declaration, and import section.
  2. Between class declarations.
  3. Between method declarations.
  4. Between the last field declaration and the first method declaration in a class
  5. Before a block or single-line comment, unless it is the first line in a block.

Don't use more than one single blank line to separate grouped sections.


Dennis Seah Mon Jul 17 11:43:42 2006