A computer program is a compilation of instructions, and each of these instructions is called a statement. There are many types of statements in Java and some—such as if, while, for, and switch—are conditional statements that determine the flow of the program. Even though statements are not features specific to object-oriented programming, they are vital parts of the language fundamentals. This chapter discusses Java statements, starting with an overview and then providing details of each of them. The return statement, which is the statement to exit a method, is discussed in Chapter 4, “Objects and Classes.”