write a short program in java where the break statement is not applied in any particular case
Answers
Answered by
1
Answer:
While working with loops, it is sometimes desirable to skip some statements inside the loop or terminate the loop immediately without checking the test expression.
In such cases, break and continue statements are used. You will learn about the Java continue statement in the next tutorial.
The break statement in Java terminates the loop immediately, and the control of the program moves to the next statement following the loop.
It is almost always used with decision-making statements (Java if...else Statement).
Here is the syntax of the break statement in Java:
Explanation:
hope you like it
Attachments:
Similar questions