Computer Applications
What is the use of break statement in Java?
Java Iterative Stmts
2 Likes
Answer
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
Related Questions
Write a program in Java to find the Fibonacci series within a range entered by the user.
Sample Input:
Enter the minimum value: 10
Enter the maximum value: 20Sample Output:
13To execute a loop 10 times, which of the following is correct?
- for (int i=11;i<=30;i+=2)
- for (int i=11;i<=30;i+=3)
- for (int i=11;i<20;i++)
- for (int i=11;i<=21;i++)