String in switch case
posted 6 years ago
Actually, int and everything that is assignable to int. That includes char, short and byte. Since Java 5.0 enums can also be used in switch statements, and Java 7 may (finally?) introduce the switch statement for Strings. It has been discussed, but I don't know what the status on that is.