Quiz

Although this hour is literally filled with errors, see whether you can answer the following questions about them without making any errors of your own.

Questions

1:

How many exceptions can a single catch statement handle?

  1. Only one
  2. Several different exceptions
  3. This answer intentionally left blank.
2:

When will the statements inside a finally section be run?

  1. After a try-catch block that has ended with an exception
  2. After a TRy-catch block that has ended without an exception
  3. Both
3:

With all this talk about throwing and catching, what do the Texas Rangers need to do in the off-season?

  1. Get some more starting pitching
  2. Sign a left-handed power-hitting outfielder who can reach the short porch in right
  3. Bring in some new middle relievers

Answers

A1:

b. An Exception object in the catch statement can handle all exceptions of its own class and its superclasses.

A2:

c. The statement or statements in a finally section always are executed after the rest of a try-catch block, whether or not an exception has occurred.

A3:

a. Every answer is correct, but a. is more correct than the others, and will probably be correct for the next 30 years.

      
Comments