5 Control Statements: Part 2; Logical Operators

Objectives

In this chapter you’ll:

  • Learn the essentials of counter-controlled iteration.

  • Use the for and dowhile iteration statements to execute statements in a program repeatedly.

  • Understand multiple selection using the switch selection statement.

  • Implement an object-oriented AutoPolicy case study using Strings in switch statements.

  • Alter the flow of control with the break and continue program-control statements.

  • Use the logical operators to form complex conditional expressions in control statements.

Get Java How to Program, Early Objects, 11th 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.