Computer Science, asked by Pragatinm, 11 months ago

what if you do not provide a break in java?​

Answers

Answered by avats673
0

Answer:

) Use break statement to come out of the loop instantly. Whenever a break statement is encountered inside a loop, the control directly comes out of loop and the loop gets terminated for rest of the iterations. It is used along with if statement, whenever used inside loop so that the loop gets terminated for a particular condition.

The important point to note here is that when a break statement is used inside a nested loop, then only the inner loop gets terminated.

Explanation:

Folllow me and mark as Brainlist ♥️♥️

Answered by sAYAN1321
1

Explanation:

Not every case needs to contain a break. If no break appears, the flow of control will fall through to subsequent cases until a break is reached. A switch statement can have an optional default case, which must appear at the end of the switch. ... No break is needed in the default case.

Similar questions