Owl Teach Yourself Java in 24 Hours, Fifth Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS
ROGERS CADENHEAD

Hour 8: Repeating an Action with Loops

Online Interactive Learning Lab

How to create the Benchmark application.

Hour 8 Quiz

Question 1. What must be used to separate each section of a for statement?

1.a. Commas

1.b. Semicolons

1.c. Off-duty police officers

Commas are used to separate things within a section, but semi-colons separate sections.

Question 2. Which statement causes a program to go back to the statement that began a loop and then keep going from there?

2.a. Continue

2.b. Next

2.c. Skip

The break statement ends a loop entirely, and continue skips to the next go-round of the loop.

Question 3. Which loop statement in Java always will run at least once?

3.a. for

3.b. do-while

3.c. while

The while conditional isn't evaluated until after the first pass through the loop.

Notes and Corrections

  • None.

Source Files

Reader Questions

  • None.

Activities

   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS

Search terms used to find this page: Java programming, teach yourself, 24 hours, how to, learn, Sams, Macmillan, Java2, JDK1.5, Java 1.5, JDK 1.5, SDK1.5, Java 2 SDK 1.5, SDK 1.5, Java 2 version 1.5, J2SE 1.5, J2SE 5, Java 2 Standard Edition 1.5, Java 2 Standard Edition 5, Java 2 SDK, Java SDK, Rogers Cadenhead, tutorial, hands-on, source code, code, javac, java, appletviewer, help, learning, applet, application, Java Plug-in, plugin, Swing, GUI, interface, Java2D, IO, Java Web Start, games, novice, beginner, neophyte, rookie

Valid HTML 4.01!

Valid CSS!