Now in Java 1.7 - Support for Strings in switch statements
With the release of Java 1.7, some cool new features have been added to the language. One of them is the support for Strings in switch statements (finally eh!). Prior to 1.7, the cases labels could be a byte, short, char, or int and their corresponding wrapper classes. Support for enum types is implied and have made it possible to provide more meaningful representations for primitive data types however, sometimes you just want to use String case labels and now you finally can.
http://download.oracle.com/javase/tutorial/java/nutsandbolts/switch.html
Short URL for this post: http://tmblr.co/Zd8FQxE1CLC2