O'Reilly logo

Java Thread Programming by Paul Hyde

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Exception Callback

IN THIS CHAPTER

Exceptions can be thrown just about anywhere in a Java program. Methods must declare all of the exceptions they might throw except for RuntimeException and its subclasses. A RuntimeException can occur on just about every line of code (just think of the fact that NullPointerException can be thrown anytime a method is invoked if the object reference is null!).

When an exception occurs and is not immediately caught, it propagates up the call stack until it either is caught by one of the invoking methods, or remains uncaught. For methods called from the main() method, the exception can potentially float all the way back up to main() ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required