Java Switch Statement
The switch statement is used to execute a block of statements based on the switch expression value. An expression must be of type int, short, byte, or char. A case value should be a constant literal value and can not be duplicated. The expression value is compared with each case value. If a match is … Read more