Garbage in, garbage out.
Input and output of program data are usually referred to as I/O. A Java program can perform I/O in many different ways. This section presents some very simple ways to handle text as either input typed at the keyboard or output sent to the screen. In later chapters, we will discuss more elaborate ways to do I/O.
We have been using simple output statements since the beginning of this book. This section will summarize and explain what we have already been doing. In Listing 2.3, we used statements such as the following to send output to the display screen:
System.out.println("Enter a whole number from 1 to 99."); . . . System.out.println(quarters + "quarters"); ...