Using the while Loop : Statements « JSP « Java

Using the while Loop

    <TITLE>Using the while Loop</TITLE>

    <H1>Using the while Loop</H1>
        int value = 5;

        while (value > 0) {
            out.println("The value is now " + value-- + ".<BR>");


Related examples in the same category

1.Using the continue Statement
2.Using the break Statement
3.While statement
4.While: Finding a Factorial
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