What is the use of break statement in Java?
2 Likes
The break statement terminates the current loop or switch statement. The execution then continues from the statement immediately following the current loop or switch statement.
Answered By
1 Like
Give the output of the following program segment. How many times is the loop executed?
for(x=10; x>20;x++) System.out.println(x); System.out.println(x*2);