Java Statements

Java provides a wide range of programming statements that can be used to create structured object-oriented programs. These statements allow you to evaluate expressions, invoke methods, shape and control the flow of program execution, and throw and handle exceptions. Table 5.1 provides a summary of the programming statements that Java provides. You covered assignments in Chapter 3, “Operators and Assignments,” and declarations in Chapter 4, “Declarations and Access Control.” This chapter is limited to those statements that affect the flow of program execution.

Table 5.1. Java Statements
StatementDescriptionExample
emptyConsists of just ; that performs no operation.;
blockCharacterizes a group of statements enclosed by { and } . The ...

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.