Can Switch case write string?

Yes , we can use a switch statement with Strings in Java. … 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.

Sizin İçin Seçtik  Merkez bankalarının para yaratma yöntemleri nedir?

Leave a Reply

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