whar are the rules to be followed while using switch statements
Answers
Answered by
1
Answer:
What are the switch statements
Answered by
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
History,
6 months ago
Science,
6 months ago
English,
6 months ago
English,
1 year ago
Accountancy,
1 year ago