Cover Page by Budi Kurniawan

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 3

Statements

A computer program is a compilation of instructions called statements. 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.”

An Overview of Java Statements

In programming, a statement is an instruction to do something. Statements control the sequence of execution of a program. ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required