Chapter 5. Flow control

Exam objectives covered in this chapter

What you need to know

[3.4] Create if and if-else constructs. How to use if, if-else, if-else-if-else, and nested if constructs. The differences between using these if constructs with and without curly braces {}.
[3.5] Use a switch statement. How to use a switch statement by passing the correct type of arguments to the switch statement and case and default labels. The change in the code flow when break and return statements are used in the switch statement.
[5.1] Create and use while loops. How to use the while loop, including determining when to apply the while loop.
[5.2] Create and use for loops, including the enhanced for loop. How to use for and ...

Get OCA Java SE 7 Programmer I Certification Guide 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.