Control Statements
if/else and switch
if/else
A computer program selects the next action based on predetermined criteria or conditions. Java has 3 selection statements:
- the if statement,
- the if/else statement, and
- the switch statement