revised: 9/26/98, 7/30/99, 01/17/00, 06/01/00, 01/16/06

CHAPTER 10 — Input and Output

This chapter discusses input and output for Java 5.0. Most programs input data, process it, and then output the results. This chapter discusses ways to input data from the keyboard and output results to the monitor. Later chapters will discuss input and output from disk files and other media.

Chapter Topics:

Note: If you are reading a Java textbook and are also following these notes you may find that your text book uses its own methods for doing input from the keyboard. The methods in your textbook are probably require you to install a special package written by the book's author. This is OK, both ways of doing input can coexist, and you can continue to use these notes (with Java methods) and your text (with its methods).

QUESTION 1:

When a computer program does an input operation, in which direction does the data flow?