Java Reference
In-Depth Information
11
.
What are the three ways that an exception can be generated?
An exception can be generated by an error in the JVM, by an error in your program,
or explicitly via a
throw
statement.
Error
and
Exception
The multi-catch feature allows one
catch
clause to catch two or more exceptions.
No.
Chapter 10: Using I/O
The byte streams are the original streams defined by Java. They are especially useful
for binary I/O, and they support random-access files. The character streams are op-
timized for Unicode.
streams for this purpose?
The predefined streams,
System.in
,
System.out
, and
System.err
, were defined be-
fore Java added the character streams.
Here is one way to open a file for
byte
input:
Here is one way to open a file for reading characters:
Here is one way to open a file for random access: