Java Continue Statement

Continue statement skips the remaining statements of current iteration of a loop and continue next iteration of the loop. Unlike break statement, continue won't terminate loop but skip remaining statements of current iteration and start new iteration from beginning.

We use continue statement, when we want to skip execution of current iteration if some condition becomes true.

In case of nested loops, if continue statement is encountered inside inner loop then it will only skip current iteration of inner loop.

Syntax of continue Statement

continue;