1(viii)
Which of the following is not true with regards to a switch statement?
- (a)checks for an equality between the input and the case labels
- (b)supports floating point constants
- (c)break is used to exit from the switch block
- (d)case labels are unique
Show SolutionHide Solution↓
supports floating point constants
Reason — The switch statement does not support float or double constants as case labels. It supports byte, short, int, char, String and enum.