Owl Teach Yourself Java in 24 Hours, Fifth Edition
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS
ROGERS CADENHEAD

Hour 18: Handling Errors in a Program

Online Interactive Learning Lab

How to create the PageCatalog application and the related HomePage class.

Hour 18 Quiz

Question 1. How many exceptions can a single catch statement handle?

1.a. Only one

1.b. Several different exceptions

1.c. This answer intentionally left blank

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

Question 2. When are the statements inside a finally section run?

2.a. After a try-catch block has ended with an exception

2.b. After a try-catch block has ended without an exception

2.c. Both

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

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

3.a. Get more starting pitching

3.b. Sign a left-handed power-hitting outfielder who can reach the short porch in right

3.c. Bring in new middle relievers

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

Notes and Corrections

  • None.

Source Files

Reader Questions

  • None.

Activities

   
HOME / FEEDBACK / ORDER THE BOOK / OTHER BOOKS / PREVIOUS HOUR / NEXT HOUR / THANKS

Search terms used to find this page: Java programming, teach yourself, 24 hours, how to, learn, Sams, Macmillan, Java2, JDK1.5, Java 1.5, JDK 1.5, SDK1.5, Java 2 SDK 1.5, SDK 1.5, Java 2 version 1.5, J2SE 1.5, J2SE 5, Java 2 Standard Edition 1.5, Java 2 Standard Edition 5, Java 2 SDK, Java SDK, Rogers Cadenhead, tutorial, hands-on, source code, code, javac, java, appletviewer, help, learning, applet, application, Java Plug-in, plugin, Swing, GUI, interface, Java2D, IO, Java Web Start, games, novice, beginner, neophyte, rookie

Valid HTML 4.01!

Valid CSS!