Multiple choice technology programming languages

The only type that a switch can evaluate is the primitive int

  1. True

  2. False

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

A switch statement in Java can evaluate multiple types, not just the primitive int. Supported types include byte, short, char, int, enum types, String, and wrapper classes like Integer or Character. Therefore, the statement is false.