Hello,
I have a problem with switch cases in IntelliJ. Since 1.7 Java supports switch case using Strings.
In IntelliJ the compiler tells me " Incompatible types. Found 'Java.lang.String', required: 'byte, char, short or int' ".
In eclipse is everything working properly. I reinstalled all my JRE and JDK, also tried Java 8 Early Access. I'm using IntelliJ 12.1, but I also tried IntelliJ 13 EA. But always the same problem with switch case.
Code:
String s = "test";
switch (s) {
case "test" : System.out.println("test");
}
Thanks in advance!