MCQ Practice Single Best Answer Topic: ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER

Q Which of the following is not true with regards to a switch statement?

Question ID
#24261
Subchapter
ICSE Computer Application - Class X - 2025 SPECIMEN QUESTION PAPER
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • 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
Correct Answer: B

Explanation

Switch statement rules in Java

  1. Checks for equality between the input expression and case labels → ✅ True

  2. Supports floating point constants → ❌ Not allowed

    • In Java, switch can only work with:

      • byte, short, char, int

      • Their wrapper classes (Byte, Short, Character, Integer)

      • String

      • enum types

    • float and double are not allowed.

  3. break is used to exit the switch block → ✅ True

  4. Case labels are unique → ✅ True


Answer: (b) supports floating point constants

Share This Question

Share this MCQ with your friends or study group.