February 2014
Beginner
1248 pages
62h 25m
English
All exceptions derive from class Throwable, which has a printStackTrace method that outputs to the standard error stream the stack trace (discussed in Section 11.2). Often this is helpful in testing and debugging. Class Throwable also provides a getStackTrace method that retrieves the stack-trace information that might be printed by printStackTrace. Class Throwable’s getMessage method returns the descriptive string stored in an exception.
Error-Prevention Tip 11.7
An exception that’s not caught in an application causes Java’s default exception handler to run. This displays the name of the exception, a ...
Read now
Unlock full access