Using Compound Statements : Statements « JSP « Java

Using Compound Statements

    <TITLE>Using Compound Statements</TITLE>

    <H1>Using Compound Statements</H1>
        int value = 10;

        if(value > 0) {
            out.println("The number was positive.");                
            out.println("Absolute value of " + value + " = " + value);


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.Using the while Loop
6.For loop: Using Two Loop Indexes
7.Using the if Statement
8.Testing for Multiple Conditions
9.Using the switch Statement
10.Using an if-else Ladder
11.Nested if Statements