Created: 03/19/2006, Revised 08/20/2014
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 for chapter 24, disk I/O is not much used again in these pages until chapter 80. However, many interesting programs do disk I/O, so it is useful to know.
Scanner
with disk files.Scanner
PrintWriter
print()
and println()
Methods of PrintWriter
In our programs so far, what input stream has been used with Scanner
?