Chapter 5, “Flow Control and Exception Handling”
Java provides a wide array of operators and commands to control program flow and handle exceptions. These operators and commands are summarized in Table 1.
Statement | Description | Example |
---|---|---|
empty | A statement consisting of just; that performs no operation. | ; |
block | A group of statements enclosed by { and }. The statement block is treated as a single statement when used with selection, interation, and other statements. |
{ x += y; if(x==100) return y; ) |
declaration | A statement that declares a variable of being of a particular type and optionally assigns a value to the variable. | String s = "abcd"; |
labeled | Statements can be labeled by preceding ... |
Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams 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.