Using the continue Statement : Statements « JSP « Java






Using the continue Statement

<HTML>
  <HEAD>
    <TITLE>Using the continue Statement</TITLE>
  </HEAD>

  <BODY>
    <H1>Using the continue Statement</H1>
    <%
        for(double i = 6; i >= -6; i--) {
            if (i == 0) continue;
            out.println("The reciprocal of " + i +
                " is " + (1 / i) + ".<BR>");
        }
    %>
  </BODY>
</HTML>

           
       








Related examples in the same category

1.Using the break Statement
2.While statement
3.While: Finding a Factorial
4.Using the while Loop
5.For loop: Using Two Loop Indexes
6.Using the if Statement
7.Testing for Multiple Conditions
8.Using the switch Statement
9.Using an if-else Ladder
10.Nested if Statements
11.Using Compound Statements