tailieunhanh - Ebook Beginning programming with Java for dummies: Part 2

Part 2 this book includes these contents: Controlling the flow (creating loops within loops, the old runaround,.), using program units (using loops and arrays, programming with objects and classes,.), the part of tens. Invite you to consult. | Part III Controlling the Flow Check out the article “How to Squeeze Nanoseconds out of a Java Loop” (and more) online at In this part . . . ✓ Making big decisions (or, more accurately, making not-so-big decisions) ✓ Repeating yourself, repeating yourself, and repeating yourself again ✓ Getting data from files on your computer’s hard drive 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 H ere’s an excerpt from Beginning Programming with Java For Dummies, 4th 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. Decisions, Decisions! Picture yourself walking along a quiet country road. You’re enjoying a pleasant summer day. It’s not too hot, and a gentle breeze from the north makes you feel fresh and alert. You’re holding a copy of this book, opened to Chapter 9. You read the paragraph about storing words or sentences, and then you look up. * 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, 4th Edition in your local bookstore, visit . 178 Part III: Controlling the Flow You see a fork in the road. You see two signs — one pointing to the right; the other pointing to the left. One sign

TỪ KHÓA LIÊN QUAN