1(xii)
Which of the following data type cannot be used with switch case construct?
- (a)int
- (b)char
- (c)String
- (d)double
Show SolutionHide Solution↓
double
Reason — The switch statement in Java supports specific data types for the case labels. However, double and float data types cannot be used.
Data Types supported in switch statement are:
intcharString