Flow Control and Exceptions


    •    Use if and switch Statements

    •    Develop for, do, and while Loops

    •    Use break and continue Statements

    •    Use try, catch, and finally Statements

    •    State the Effects of Exceptions

    •    Recognize Common Exceptions

    image  Two-Minute Drill

Q&A Self Test

Can you imagine trying to write code using a language that didn’t give you a way to execute statements conditionally? Flow control is a key part of most any useful programming language, and Java offers several ways to accomplish it. Some statements, such as if statements and for loops, are common to most ...

Get OCA/OCP Java SE 7 Programmer I & II Study Guide (Exams 1Z0-803 & 1Z0-804) now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.