Created: 03/19/2006, Revised 08/20/2014, 10/13/2017, 05/29/2023

go to home page   go to next page highlighting

CHAPTER 72 — File I/O with Scanner and PrintWriter

This chapter discusses how to use the Scanner class for input from files and how to use the PrintWriter class for output to files.

This chapter is optional. Except in a few exercises, disk I/O is not much used again in these pages until the chapters on Exceptions. However, many interesting programs require disk I/O, so it is useful to know.

Neither Scanner nor PrintWriter appear in the AP Computer Science test.

Chapter Topics:


QUESTION 1:

In our programs so far, what input stream has been used with Scanner ?


go to home page   go to next page