Java Continue Statement program

  1. public class Continue{  
  2.     public static void main(String[] args){  
  3.         Thread t = new Thread();  
  4.         int a = 0;  
  5.         try{  
  6.             for (int i=1;i<10;i++)  
  7.             {  
  8.                 if (i == 5)  
  9.                 {  
  10.                     continue;  
  11.                     //control will never reach here (after the continue statement).  
  12.                     //a = i;  
  13.                 }  
  14.                 t.sleep(1000);  
  15.                 System.out.println("Raja");  
  16.                 System.out.println("Value of a : " + a);  
  17.             }  
  18.         }  
  19.         catch(InterruptedException e){}  
  20.     }