❮ Previous Next ❯

Java Continue statement:

Here is an example to demonstrate continue .

class ContinueDemo
{
public static void main(String args[])
{
int n;
for(n=1;n<=5;n++)
{
if(n==3)
{
System.out.println("JavaRace");
continue;
}
System.out.println("number="+n);
}
System.out.println("out of for loop");
}
}

Output


number=1
number=2
JavaRace
number=4
number=5
out of for loop

❮ Previous Next ❯



  Tutorials

Popular Links

Contact Us

address Plot No-741,2ND Floor
Opp. Bhagabati Temple,Jayadev Vihar
      Bhubaneswar-751013
      Email: info@silantechnology.com
      Phone: 0674-2361252
address
39877, sundale dr, apt#101, Fremont, California 94538, USA
       Phone: +1(262)388-7619

facebook twitter google linked in

© 2018 Silan Technology. All Rights Reserved