O'Reilly logo

Java 7: A Beginner's Tutorial (Third Edition) by Budi Kurniawan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required