You can’t switch on conditions like x. contains() . Java 7 supports switch on Strings but not like you want it. Use if etc.
Can we use contains in switch case Java?
You can’t switch on conditions like x. contains() . Java 7 supports switch on Strings but not like you want it. Use if etc.19 Tem 2012