Java Reference
In-Depth Information
5
Conditionals
and Loops
CHAPTER OBJECTIVES
Define the flow of control through a method.
Explore boolean expressions that can be used to make decisions.
Perform basic decision making using if statements.
Discuss issues pertaining to the comparison of certain types of data.
Execute statements repetitively using while loops.
Discuss the concept of an iterator object and use one to read a text file.
Draw with the aid of conditionals and loops.
Explore more GUI components and events.
A ll programming languages have statements that allow you to
make decisions to determine what to do next. Some of those state-
ments allow you to repeat a certain activity multiple times. This
chapter discusses key Java statements of this type and explores issues
related to the comparison of data and objects. It begins with a dis-
cussion of boolean expressions, which form the basis of any decision.
The Graphics Track sections of this chapter explore new drawing
options and some new components and events.
207
 
 
Search WWH ::




Custom Search