Jump label using For Loop Example in Java


Here is the simple program for printing jump lable using For Loop in Java.

Source Code

import java.io.*;
import java.util.Scanner;
class label
{
  public static void main(String args[])
  {
   int i,j;
   lab:for(i=0;i<10;i++)
   {
   	System.out.print("\n");
   	for(j=0;j<=10;j++)
   	{
    if(j==3)
    {
      continue lab;
    }
    System.out.print("*");
   	}
   }
  }
}
To download raw file Click Here

Output

***
***
***
***
***
***
***
***
***
***


Learn All in Tamil © Designed & Developed By Tutor Joes