O'Reilly logo

Sams Teach Yourself Java™ 6 in 21 Days by Laura Lemay, Rogers Cadenhead

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 4. Lists, Logic, and Loops

Today, you learn about three of the most boring features in the Java language:

  • How to make part of a Java program repeat itself by using loops

  • How to make a program decide whether to do something based on logic

  • How to organize groups of the same class or data type into lists called arrays

If these features don’t sound boring to you, they shouldn’t. Most of the significant work that you will accomplish with your Java software will use all three.

These topics are boring for computers because they enable software to do one of the things at which it excels: performing repetitive tasks over and over.

Arrays

At this point, you have dealt with only a few variables in each Java program. In some cases, it’s manageable to use ...

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