The switch statement transfers control to one of several statements or expressions, depending on the value of an expression.
SwitchStatement:
switch ( Expression ) SwitchBlock
The Expression is called the selector expression. The type of the selector expression must be char, byte, short, int, or a reference type, or a compile-time error occurs.
Sections: