Which three are valid types for switch?

Which three are valid types for switch?

Which three are valid types for switch?

A.
int

B.
float

C.
double

D.
Integer

E.
String

F.
Float

Explanation:
A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types the String class, and a few special classes that wrap certain primitive types:
Character, Byte, Short, and Integer.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


James

James

The Answer is A, D, E.

A switch works with the byte, short, char, and int primitive data types. It also works with enumerated types (Enum), the String class, and a few special classes that wrap certain primitive types: Character, Byte, Short, and Integer (discussed in Numbers and Strings).

Remember biscS (byte, int, short, char, and String)