Logo 
Search:

Java Articles

Submit Article
Home » Articles » Java » Homework HelpRSS Feeds

Program to show the use of Labeled Continue Statement

Posted By: Rogelio Carter     Category: Java     Views: 3710

A Java Program to show the use of Labeled Continue Statement.

Code for Program to show the use of Labeled Continue Statement in Java

publicclass JAVA_032
 {

    publicstaticvoid main(String[] args)
    {
       long limit=20;
       long factorial=1;

       OuterLoop:

       for(int i=1;i<=limit;i++)
       {
          factorial=1;

          for(int j=2;j<=i;j++)
          {
             if((i%2)==0)
                continue OuterLoop;

             factorial*=j;
          }

          System.out.println("Factorial of " + i + " = " + i + "! = " + factorial);
       }
    }
 }
  
Share: 


Didn't find what you were looking for? Find more on Program to show the use of Labeled Continue Statement Or get search suggestion and latest updates.

Rogelio Carter
Rogelio Carter author of Program to show the use of Labeled Continue Statement is from New York, United States.
 
View All Articles

 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!