I think I would answer d since java.lang.Exception is extended by java.io.IOException ... EOFException extends IOExeption but may not be the specific exception thrown so if you caught that I don't think it would compile. Also I think in this case you would not use a throw statement to throw an IOException. I think all this question is testing is your knowledge of the API ... ie... which class extends which. [This message has been edited by Angela Poynton (edited January 05, 2001).]
Pounding at a thick stone wall won't move it, sometimes, you need to step back to see the way around.
I agree with Angela, I think it is D also. A. - False EOFException is a subclass of IOException so you are not throwing the entire exception, just part of it. B. - False Would be true if this was throws statement, but not a throw statement. You throw new exceptions, and you use throws to pass the exception to the where the method was called. C. - False, same as A. D. - True, Exception is a superclass of IOException, so if you catch this then you are catching all of IOException. Bill