MCQ
Single Best Answer
Easy
QWhich of the following is not true with regards to a switch statement?
ID: #24261
ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER
51 views
Question Info
#24261Q ID
EasyDifficulty
ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPERTopic
Your Answer
Choose the Best Option
Click any option to instantly check if you're correct.
Correct Answer: Option B
Explanation
Switch statement rules in Java
-
Checks for equality between the input expression and case labels → ✅ True
-
Supports floating point constants → ❌ Not allowed
-
In Java,
switchcan only work with:-
byte,short,char,int -
Their wrapper classes (
Byte,Short,Character,Integer) -
String -
enumtypes
-
-
float and double are not allowed.
-
-
breakis used to exit the switch block → ✅ True -
Case labels are unique → ✅ True
✅ Answer: (b) supports floating point constants
Continue Practice
Share
Share This Question
Challenge a friend or share with your study group.
More from This Topic