Skip to Content
Java: The Complete Reference, Eleventh Edition, 11th Edition
book

Java: The Complete Reference, Eleventh Edition, 11th Edition

by Herbert Schildt
December 2018
Intermediate to advanced
1248 pages
33h 55m
English
McGraw-Hill
Content preview from Java: The Complete Reference, Eleventh Edition, 11th Edition

CHAPTER

5

Control Statements

A programming language uses control statements to cause the flow of execution to advance and branch based on changes to the state of a program. Java’s program control statements can be put into the following categories: selection, iteration, and jump. Selection statements allow your program to choose different paths of execution based upon the outcome of an expression or the state of a variable. Iteration statements enable program execution to repeat one or more statements (that is, iteration statements form loops). Jump statements allow your program to execute in a nonlinear fashion. All of Java’s control statements are examined here.

Java’s Selection Statements

Java supports two selection statements: if and switch ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Java: The Complete Reference, Twelfth Edition, 12th Edition

Java: The Complete Reference, Twelfth Edition, 12th Edition

Herbert Schildt

Publisher Resources

ISBN: 9781260440249