- Expression statements
s = "hello world"; x = Math.sqrt(4); x++
- Compound statements
whileloop consists of a single statement. If you want the loop to execute more than one statement, use a compound statement. This is a common technique with if, for, and other statements described later.
- Empty statements
The empty statement is simply a semicolon by itself. It does nothing and is occasionally useful for coding empty loop bodies.
- Labeled statements
case constant-expression: statements [ break ; ]
Because of the nature of the
switchstatement, a group of statements labeled by case ...