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.
Scanner with disk files.ScannerPrintWriterprint() and println() Methods of PrintWriter
In our programs so far, what input stream has been used with Scanner ?