What is the difference between a break statement and a continue statement? A break statement when applied to a loop ends the statement. A continue statement ends the iteration of the current loop and returns the control to the loop statement. If the break keyword is followed by an identifier that is the label of a random enclosing statement, execution transfers out of that enclosing statement. If the continue keyword is followed by an identifier that is the label of an enclosing loop, execution skips to the end of that loop instead.
What is the difference between a break statement and a continue statement?The break and the continue statements are generally used along with a condition, which when met is executed.
However, a break statement discontinues the execution of the loop and gets the control out of the loop after meeting the condition. On the other hand the continue statement on meeting the condition, goes to the beginning of the loop and re-executes it.