Java-Switch Statement

Switch Statement The switch statement is provides a better alternative than a large series of if-else-if statements. Here is its general form: The expression must be of type byte, short, int, or char; each of the values specified in the case statements must be of a type compatible with the expression. Each case value must … Read more…