Java Switch Statement

Switch statement in Java is for decision making. Unlike if-then and if-then-else statements, the switch statement can have a number of possible execution paths.

Syntax

The general form of a switch statement is: