Hi,
switch(name) //Where name is a String
{
Code block
}
I am trying to use a String switch statement like the one just above. I am getting the following error:
Error: Cannot switch on a value of type java.lang.String. Only convertible int values or enum constants are permitted.
After some research, a String can only be used in a switch statement in Java 1.7. I do have the most up to date version of Java 1.7 (checked on the java website) and I am still getting that error. Does anyone know why and how I can fix it?
Additional info: Compiler is Eclipse Compiler 0A48 with Dr. Java.
Thank you.