Answers to the chapter 13 review questions.

1.  What are the differences between terminal I/O and file I/O?  Are there any 
    similarities?

  A:  Terminal I/O reads from the keyboard and writes to the screen.  File I/O 
      reads and writes to a file.  They use similar methods to do the reading
      and writing.

2.  What three steps are always necessary for file I/O?

  A:  1. Open the file.
      2. Read and write the data.
      3. Close the file.

3.  Why do you close a file?

  A:  To let the system know that we are done with the file.

4.  What is a text file?

  A:  A file containing lines of text separated by newline characters.

5.  What are the differences between text and binary files, related to I/O?

  A:  In Java you use FileReader and FileWriter for text files and 
      FileInputStream and FileOutputStream for binary files.
