{
String temp = /*some string */
switch(temp)
{
case "enter": // action A
case "shift": // action B
case "tab": // action C
case "space": // action D
case "backspace": // action E
}
}
This is some code that won't compile because Greenfoot complains that the switch operation is not supported in this case (Assume the commented out stuff works). The error is literally given, "strings in switch are not supported in -source 1.6 (use -source 7 or higher to enable strings in switch). My problem is that Java 7 is the only SE version installed on my computer, but it somehow treats it as Java 6 (based on what I'm seeing). I am running Greenfoot v 2.2.1 at the moment. Can I get any help with this? Note that I did get a couple other Java 7-specific features such as the new multiple-exception handling thread.