Advertisements
Advertisements
Question
When does Fall through occur in a switch statement? Explain.
Answer in Brief
Solution
- In a switch block with various cases, the control has to perform a specified case block based on the switch value.
- If no break is applied at the end of the case block, the control moves to the following case block for execution.
- 'Fall through' refers to the uncommon execution of several cases for a given switch value.
shaalaa.com
Is there an error in this question or solution?
Chapter 1.08: Conditional Statements in Java - EXERCISES [Page 100]