The variable used in a switch statement can only be a short, byte, int or char . The values for each case must be the same data type as the variable type.
The variable used in a switch statement can only be a short, byte, int or char . The values for each case must be the same data type as the variable type.