| 2.1 One level of indentation is four spaces.
2.2 All statements within a block are indented
one level.
2.3 Braces for classes, methods and all other blocks are alone
on one line.
The braces for classes, methods, and all other blocks are
on separate lines and are at the same indentation level,
for example:
public int getAge()
{
statements
}
2.5 Always use braces in control structures.
Braces are used in if-statements and loops
even if the body is only a single statement.
2.7 Use a space around operators.
2.8 Use a blank line between methods (and constructors).
Use blank lines to separate logical blocks of code. This
means at least between methods, but also between logical
parts within a method. Do not use a blank line between a method and its comment.
|