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.

Sizin İçin Seçtik  Does STR contain?

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Sizin İçin Seçtik  Can we use switch and if together?

Leave a Reply

Your email address will not be published. Required fields are marked *