Programming and Problem Solving with Java

(やまだぃちぅ) #1

5


CHAPTER


we used System.infor input and System.outfor out-
put. With these classes, all input is from the keyboard and output is to the
screen. In this chapter, we look at input that can be prepared ahead of time
on a file and output that can be written to a file for later use. We also ex-
amine another of Java’s control structures, the loop. In Chapter 4, we saw
how the flow of control in an application can be altered to select among
different actions with the ifstatement. In this chapter, we work with a
statement that allows us to repeat actions: the whilestatement.


In Chapters 2, 3, and 4,

1956-57
The RAMAC,
random-access
method of
accounting and
control, is
introduced by IBM
for hard disk data
storage

1957
The concept of
artificial intelligence
is developed at
Dartmouth College

1957
John Backus debuts
the first Fortran
compiler

1957
John McCarthy
founds MIT’s
Artificial
Intelligence
Department

1957
The first computer-
controlled launch of
the Atlas missile
takes place

1957
Russia launches
Sputnik I into orbit
Free download pdf