O'Reilly logo

Sams Teach Yourself JavaServer Pages™ in 21 Days by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Branching, Looping, and Creating Methods

Today we're going to get some more essential Java programming under our belts. We'll see three crucial techniques here—branching, looping, and creating methods. These are all basic skills for the JSP programmer, and we'll need them in our programming arsenal throughout the book. Here's an overview of today's topics:

  • Branching statements—. if and switch

  • Looping statements—. for, while, and do-while

  • Creating methods

  • Passing data to methods

  • Returning data from methods

Looping statements—
<HTML> 
  <HEAD>
    <TITLE>Using Logical Operators</TITLE>
  </HEAD>

  <BODY>
    <H1>Using Logical Operators</H1>
    <%
        int temperature = 70;

        if (temperature ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required