Continue Statement in for loop in java

Java Programming Language Decision Making and Looping in java (Article) Decision Making and Looping in java (Program)

1152

Program:

 public class ContinueInForLoop {
 public static void main(String[] args){
	int i;
    for(i=1; i<=10; i++){
	    if(i==5)
       	{
		 i++;
         continue;
         }
        System.out.println(i);
     }
   }
}

Output:

1
2
3
4
7
8
9
10
Press any key to continue . . .

This Particular section is dedicated to Programs only. If you want learn more about Java Programming Language. Then you can visit below links to get more depth on this subject.