created: June 6, 2000

CHAPTER --- Writing Text Files

This chapter explains how to create a text file on the hard disk and how to write character data to it.

Chapter Topics:

  • Class FileWriter.
  • Creating a disk file.
  • Closing a disk file.
  • The write() method.
  • Catching IO exceptions.
  • Class BufferedWriter.

A previous chapter in these notes used command line redirection to write text files. In this chapter, the Java program will have control of file creation and the output to it.

QUESTION 1:

What is the ancestor class of streams for character-oriented output?

Click Here after you have answered the question