giovedì 28 marzo 2013

Q57


Which three are valid types for switch?
A.
int
B.
float
C.
double
D.
Integer
E.
String
F.
Float
Risposta
Switch funziona con i tipi primitivi byte,short,char e int.
Inoltre funziona con i tipi enumerazioni su String
Infine funziona anche con alcuni tipi wrapper per i tipi primitivi:Character,Byte, Short e Integer.

1 commento: