java - Why can't I switch on a String? - Stack Overflow
The following is a complete example based on JeeBee's post, using java enum's instead of using a custom method. Note that in Java SE 7 and later you can use a String object in the switch statement's expression instead. public class Main { /** * @param arg...