hi friends ..
good morning .
©Any 3 difference between Break statement and Continue statement ??
Answers
Any 3 difference between Break statement and Continue statement
➡break
A break can appear in both switch and loop (for, while, do) statements.
➡continue
A continue can appear only in loop (for, while, do) statements.
➡break
A break causes the switch or loop statements to terminate the moment it is executed. Loop or switch ends abruptly when break is encountered.
➡continue
A continue doesn't terminate the loop, it causes the loop to go to the next iteration. All iterations of the loop are executed even if continue is encountered. The continue statement is used to skip statements in the loop that appear after the continue.
➡break
The break statement can be used in both switch and loop statements.
➡continue
The continue statement can appear only in loops. You will get an error if this appears in switch statement.
Hope it helps you:)
Please mark it brainliest..
Break leaves the loop completely and executes the statements after the loop. Whereas Continue leaves the current iteration and executes with the next value in the loop. ... A continue statement is used to end the current loop iteration and return control to the loop statement.
break causes the innermost enclosing loop or switch to be exited immediately. ... The continue statement is used when we want to skip one or more statements in loop's body and to transfer the control to the next iteration.