Switch case - Part 1

Switch Case


The switch case statement in java is the conditional statement that executes one statement out of many statements when the condition is matched. The default statement is executed when none of the conditions is matched.

The switch case always works on condition, switch case is always used with a break statement.

Do you Know?

It is not necessary to write case statements in sequence.

Only int, char, String, and Enum are allowed as switch expressions.


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

Complete and Continue  
Discussion

0 comments