Break and Continue in Java (GSEB-XII)



class breakDemo
{
public static void main(String args[])
{
int i, n=10;
for(i=1;i<=n;i++)
{
if(i==5)
continue;
System.out.println(i);
}
System.out.println("Out of Loop Body.");
}
}



No comments

Post your comments

Powered by Blogger.