Saturday, August 20, 2011

Show concept of Labelled Continue Break in java

//Show concept of Labelled Continue Break in java
class LabelledContinueBreak
{
 public static void main(String arg[])
  {
   loop:
    for(int i=1;i<100;i++)
     {
        System.out.println();
        if(i>=10)
        {
          break;
        }
       for(int j=1;j<100;j++)
        {
         System.out.print("  *");
            if(j==i)
            {
             continue loop;
            }
        }
      }
     System.out.print("Termination by BREAK");
  }
}

Previous Next Home
0 Comments
Comments

Leave a Comment

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

Twitter Delicious Facebook Favorites More