ICSE Class 10 Computer Applications Question 7 of 30

Solved 2024 Question Paper ICSE Class 10 Computer Applications — Question 12

Back to all questions
12
Question

Question 1(xii)

Which of the following data type cannot be used with switch case construct?

  1. int
  2. char
  3. String
  4. double
Answer

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:

  1. int
  2. char
  3. String