CHAPTER 84 — Reading from Text Files

Classic programmed-learning exercises, refreshed for modern Java and presented in the current MrStyner.com portfolio style.

Modern Java noteThis archive has been refreshed for Java 25 LTS. Core language concepts remain useful, while outdated setup instructions and browser-era Java are labeled or replaced. Java 26 is the current feature release; Java 25 is used here as the stable teaching baseline.
go to home page   go to next page        

created: 06/07/00; revised 06/09/03

CHAPTER 84 — Reading from Text Files

An input stream can be connected to a text file. With character-oriented input streams, characters are automatically translated from the external (disk file) format to the internal (Java char) format.

Chapter Topics:

  • Reader
  • FileReader and BufferedReader
  • readLine()
  • Text file copy program
  • C-style input loop

QUESTION 1:

What is the ancestor class of all character-oriented input streams?