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?
posted 13 years ago
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.