Switch case - Part 2

String as an expression

A String can be used as an expression in a switch statement. This switch statement expression is compared with the expression of each case. This comparison is case sensitive, so we convert all expressions into lower cases.

The following program explanation is provided in the video tutorial.


Visit this link for the full article: https://studyeasy.org/java/switch-case/

Complete and Continue  
Discussion

0 comments