Its The Simple Example for Labled Break Topic in Java.
class Break
{
public static void main(String args[])
{
int i=5;
First:
{
Second:
{
Third:
{
System.out.println("Inside the break");
if(i==5)
break Second;
System.out.println("Inside 3 block");
}
System.out.println("Inside 2 block");
}
System.out.println("Inside 1 block");
}
}
}
OUTPUT:
Inside the break
Inside 1 block
Thank Your Valuable Comment Tool to Insert codes in Comments : Convert My Code. Hide