Page 285 - COPA VOL II of II - TP -Punjabi
P. 285

ਕੀਿ੍ਡ ਜਾ੍ੀ ੍ੱਖੋ
            ਸੰਟੈਕਸ : -


                               SOURCE CODE
              //inside the for loop.
              public class ContinueExample {
              public static void main(String[] args) {
                 //for loop
                for(int i=1;i<=10;i++){
                     if(i==5){
                        //using continue statement
                       continue;//it will skip the rest statement
                      }
                      System.out.println(i);
                 }                                                 Fig 2
              }
              }
































































                                    IT & ITES - COPA - (NSQF ਸੋਧੇ - 2022) - ਅਿਭਆਸ 1.40.09&12                   271
   280   281   282   283   284   285   286   287   288   289   290