Java Programming/Keywords/continue

continue is a Java keyword. It skips the remainder of the loop and continues with the next iteration.

For example:

Computer code
int maxLoopIter = 7;

for (int i = 0; i < maxLoopIter; i++ ) {
   if (i == 5) {
      continue;  // -- 5 iteration is skipped --
   }
   System.println("Iteration = " + i);
}

results in

0
1
2
3
4
6
7

See also

Category:Book:Java Programming/Keywords#continue%20Category:Pages with deep filing
Category:Book:Java Programming/Keywords Category:Pages using deprecated enclose attributes Category:Pages with deep filing