Computer Science, asked by bablukaleemkhan11, 2 months ago

what does fall through and default do in switch case​

Answers

Answered by rai2006
1

Answer:

Fall through is a situation in java programs which occurs when the loop mises out on break statement between the different cases in switch case structure.

Explanation:

Now lets suppose, i change value of x to 3 , not matching any case, than its a fall through from default case . ... Ain't compiler needs to match every case for 3, by that time CASE 2 will be passed, than why it goes back to default and prints hello Benjamin.

Similar questions