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

Get SAMS Teach Yourself Programming with Java™ in 24 Hours, FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.