switch case java with true false code example
Example: can switch statements in java work with boolean
The expression in the switch statement must be of type char, byte, short, or int. It cannot be boolean, float, double, or String.
The expression in the switch statement must be of type char, byte, short, or int. It cannot be boolean, float, double, or String.