Explain break statement and continue statement?
Answers were Sorted based on User's Feedback
Answer / ranganathkini
The break statement exits the loop execution and starts
executing the statement just after the loop.
The continue statement stops executing the rest of the
current iteration and starts the next iteration.
| Is This Answer Correct ? | 26 Yes | 4 No |
Answer / shambhu kumar
The break keyword halts the execution of the current loop
and forces control out of the loop.
The continue is similar to break, except that instead of
halting the execution of the loop, it starts the next
iteration.
| Is This Answer Correct ? | 16 Yes | 2 No |
Answer / ravikiran(aptech mumbai)
break statement will through you out of the loop.
where as continue will aboandon the current iteration and
will make you to continue with next iteration
| Is This Answer Correct ? | 10 Yes | 2 No |
What is OOP?
How can we find the actual size of an object on the heap?
Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in reverse order.
Is alive method in java?
If there are two notepad opened and working on it . is this a process or thread? computer based Live Example to differentiate between Thread , Process , and Multi tasking ?
How many ways can we create the string object?
Can a static block throw exception?
How to set the permissions to a file in java?
Are static members inherited to sub classes?
If system.exit (0); is written at the end of the try block, will the finally block still execute?
What is meant by object?
What is Java Classloader?
1 Answers Phantom Technologies,