Next: if statement
Up: Statements
Previous: Local variable declarations
Compound statements are statements that contain a statement block enclosed in {} braces. All compound statements follow the same braces style; namely, the style commonly known as the "K & R" braces style. This includes class and method declarations. This style is specified as follows:
- The opening left brace is at the end of the line beginning the compound statement. For multiple-line compound statements, the opening curly brace shall appear alone by itself on a new line.
- The closing right brace is alone on a line, indented to the same column as the beginning of the compound statement.
- The statements inside the enclosed braces are indented one more level than the compound statement.
The rules on how to format particular statements are described below.
Subsections
Dennis Seah
Mon Jul 17 11:43:42 2006