| Author |
Exception
|
V Bose
Ranch Hand
Joined: Jul 10, 2003
Posts: 113
|
|
True or False- Assuming Line 6 throws a FileNotFoundExcepton, Would line 13 throw a Null Pointer exception? OR if things go fine up until Line 12 and Line 13 throws an IOException, will the JVM stop with an IOException?
|
 |
Nathaniel Stoddard
Ranch Hand
Joined: May 29, 2003
Posts: 1258
|
|
|
IOExceptions will never force the JVM to stop because it is a checked exception and must be handled somewhere by your program in order to even be compiled and run. As for the NullPointerException: you should check to see if it is null and open before you attempt to close it.
|
Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
|
 |
 |
|
|
subject: Exception
|
|
|