Case Java Keyword
The java keyword "case" is used to label each branch in the switch statement in java program. In other word Case is a java keyword that will be defines group of statements that will begin executing in case a value specified matches value that defined through a preceding switch keyword.
In the java programming statement case block will not have the implicit ending point. At java statement every time break statement will typically be used at the end of each case block in java program.
In statement case keyword having break statement, suspend
the flow of execution in that particular case and then next flow into all case
and also in default blocks.
Syntact: Case Java Keyword
switch () { case 1: <statements> break; case 2: <statements> break; default: <statements> break; } |