Computer Science, asked by yashvi1833, 1 year ago

whar are the rules to be followed while using switch statements​

Answers

Answered by avreetsidhu62
1

Answer:

What are the switch statements

Answered by CopyThat
6

Explanation:

A case statement cannot exist by itself, outside of a switch block.

The break statement which appears as the last statement in a case block is one of Java’s jump  statements. When a break statement is encountered in the case block, program execution  jumps to the line of C0de following the switch block i.e. outside the body of switch statement. If  break statement is missing in a case block upon completion of its execution, the control goes to  the following case block, this process continues until break statement is encountered or switch  block ends.

Similar questions