Program to demonstrate continue statement

/* Program to demonstrate continue statement */

class ContinueDemo1
{
    public static void main(String args[])
    {
        for(int i =0;i<10;i++)
        {
            System.out.print(i+" ");
            if(i%2==0) continue;
            System.out.println("");
        }
    }
}

0 comments:

Post a Comment

 
 
 
 


Copyright © 2012 http://codeprecisely.blogspot.com. All rights reserved |Term of Use and Policies|