Skip to Main Content
Java 6 Illuminated: An Active Learning Approach, 2nd Edition
book

Java 6 Illuminated: An Active Learning Approach, 2nd Edition

by Julie Anderson, Herve J. Franceschi
February 2008
Intermediate to advanced content levelIntermediate to advanced
1288 pages
39h 39m
English
Jones & Bartlett Learning
Content preview from Java 6 Illuminated: An Active Learning Approach, 2nd Edition
6.10 Count-Controlled Loops Using for 337
Enter integer 1 > 23
Enter integer 2 > 12
Enter integer 3 > 10
Enter integer 4 > 11
Enter integer 5 > 15
The total is 71
To see a step-by-step illustration of a for loop,look for the Flash movie in the Chapter 6 folder on the
CD-ROM included with this book.Click on the link for Chapter 6 to start the movie.
CODE IN ACTION
Then the users prompt would look like that shown in Figure 6.22.
We can also decrement the loop control variable. Example 6.17 shows an
application that reads a sentence entered by the user and prints the sen-
tence backward.
The pseudocode for this program is the following:
set backwards to an empty ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

JFC Swing Tutorial, The: A Guide to Constructing GUIs, Second Edition

Kathy Walrath, Mary Campione, Alison Huml, Sharon Zakhour
Java Illuminated, 4th Edition

Java Illuminated, 4th Edition

Julie Anderson, Hervé J. Franceschi

Publisher Resources

ISBN: 9780763749637