I'm on jre7 and I still can't switch on Strings. I installed jdk7 update 1 and pointed Eclipse to it but still no luck. Any idea what I'm doing wrong?
Here is a the code:
String code = "something"; switch(code) { case "xxx": dosomehting(); break; default: dosomethingelse(); break; } The error I get:
Cannot switch on a value of type String. Only convertible int values or enum constants are permitted.