What is the difference between an if statement and a switch statement?
The if statement is used to select between two alternatives. It uses a boolean expression to decide which alternative should be implemented.
The switch statement is used to select between multiple alternatives. It uses an int expression to verify which alternative should be executed.