MCQ
Which data types are valid for the test expression of Switch statement?
  • A
    Byte or float
  • B
    String or float
  • C
    String or byte
  • Byte, char, short or int

Answer

Correct option: D.
Byte, char, short or int
D

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free