Which statement is true?
Which four can be thrown using the throw statement?
1. Error
2. Event
3. Object
4. Throwable
5. Exception
6. RuntimeException
Which statement is true?
System.out.print("Start "); try { System.out.print("Hello world"); throw new FileNotFoundException(); } System.out.print(" Catch Here "); /* Line 7 */ catch(EOFException e) { System.out.print("End of file exception"); } catch(FileNotFoundException e) { System.out.print("File not found"); }
and given that EOFException and FileNotFoundException are both subclasses of
IOException, and further assuming this block of code is placed into a class,
which statement is most true concerning this code?
public class ExceptionTest { class TestException extends Exception {} public void runTest() throws TestException {} public void test() /* Point X */ { runTest(); } }
At Point X on line 5, which code is necessary to make the code compile?