I am doing a POC on Java 7 new features. I have code to use String in switch statement and it works. I want to make it work in case insensitive also. Is there a way to check
From oracle docs switch with string
The String in the switch expression is compared with the expressions associated with each case label as if the String#equals method were being used.
You can use
switch(s.toUpperCase()){ ... ..... }
See also