Chapter 9
Forks in the Road
IN THIS CHAPTER
Writing statements that choose between alternatives
Putting statements inside one another
Writing several kinds of decision-making statements
Here’s an excerpt from Beginning Programming with Java For Dummies, 6th Edition, Chapter 8:
If you’re trying to store words or sentences (not just single letters), then you need to use something called a String.*
This excerpt illustrates two important points: First, you may have to use something called a String. Second, your choice of action can depend on something being true or false:
- If it’s true that you're trying to store words or sentences,
- you need to use something called a String.
This chapter deals with decision-making, which plays a fundamental role in the creation of instructions. With the material in this chapter, you expand your programming power by leaps and bounds.
* This excerpt is reprinted with permission from John Wiley & Sons, Inc. If you can’t find a copy of Beginning Programming with Java For Dummies, 6th Edition, in your local bookstore, visit www.dummies.com
.
Decisions, Decisions!
Picture yourself walking along a quiet country road. You’re enjoying a pleasant summer ...
Get Beginning Programming with Java For Dummies, 6th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.