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

CHAPTER 10 — Input and Output

To be useful, a program must input data and output the results of processing that data. This chapter discusses some easy ways to input and output data from the keyboard and monitor. Input and output operations are a very complicated aspect of computers (and computer programming languages), so this chapter is just a beginning.

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. This is OK, You can still use these notes. The methods used in these notes are part of the JDK (Java Development Kit) and will work for every Java installation. The methods in your textbook are (probably) unique to that book and require you to use a special package written by the book's author. Those methods are based on the methods in the JDK and are fundamentally the same as the methods used in these notes.


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