(CSCI 2010 - Quiz 5: 2026 Test Preparation)
Which of the following classes is for an exception that RuntimeException
does not need to be caught in a catch block or
declared in a throws clause?
If you are going to insert a throw statement in your False
code it is probably best to use the built-in Exception
class rather than building your own.
Which of the following is the correct method heading public void doSomething() throws SomethingWentWrongException
for a method called doSomething that throws an
exception called SomethingWentWrongException?
A method that does not handle an exception that it True
throws must have a throws clause in its heading.
When is a finally block executed? Both of the above.
What is an exception? An object that signals the occurrence of an unusual event.
Java provides several predefined exception classes. True
Page 1 3/30/2026, 4:48:56 PM
Which of the following classes is for an exception that RuntimeException
does not need to be caught in a catch block or
declared in a throws clause?
If you are going to insert a throw statement in your False
code it is probably best to use the built-in Exception
class rather than building your own.
Which of the following is the correct method heading public void doSomething() throws SomethingWentWrongException
for a method called doSomething that throws an
exception called SomethingWentWrongException?
A method that does not handle an exception that it True
throws must have a throws clause in its heading.
When is a finally block executed? Both of the above.
What is an exception? An object that signals the occurrence of an unusual event.
Java provides several predefined exception classes. True
Page 1 3/30/2026, 4:48:56 PM