DO case statements work with strings?

Strings in switch The expression in the switch cases must not be null else, a NullPointerException is thrown (Run-time). Comparison of Strings in switch statement is case sensitive . i.e. the String you have passed and the String of the case should be equal and, should be in same case (upper or, lower).5 Tem 2019

Sizin İçin Seçtik  Is string allowed in switch case?

Leave a Reply

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