Java Reference
In-Depth Information
exists
java.io.FileNotFoundException
java.io.FileReader
java.io.IOException
java.io.PrintWriter
close
print
println
java.lang.Error
java.lang.IllegalArgumentException
java.lang.IllegalStateException
java.lang.NullPointerException
java.lang.NumberFormatException
java.lang.RuntimeException
java.lang.Throwable
getMessage
printStackTrace
java.util.InputMismatchException
java.util.NoSuchElementException
java.util.Scanner
close
javax.swing.JFileChooser
getSelectedFile
showOpenDialog
showSaveDialog
REVIEW EXERCISES
΢΢ Exercise R11.1. What happens if you try to open a file for reading that
doesn't exist?
What happens if you try to open a file for writing that doesn't exist?
΢΢΢ Exercise R11.2. What happens if you try to open a file for writing, but
the file or device is write-protected (sometimes called read-only)? Try it
out with a short test program.
΢
Exercise R11.3. How do you open a file whose name contains a backslash,
like c:\temp\output.dat ?
΢΢΢ Exercise R11.4. What is a command line? How can a program read its
command line arguments?
Search WWH ::




Custom Search