continiue;
continiue breaks a loop at a given point and continiue the loop
package codereferececomjava; public class CodeRefereceComJava { public static void main(String[] args) { int i; for (i=40;i<=45;i++) { if (i==42) continue; System.out.println("The answer is probably not "+i); } } }
The answer is probably not 40 The answer is probably not 41 The answer is probably not 43 The answer is probably not 44 The answer is probably not 45