February 2016
Beginner to intermediate
500 pages
187h 36m
English
First we demonstrate what happens when errors arise in an application that does not use exception handling. Figure H.1 prompts the user for two integers and passes them to method quotient, which calculates the integer quotient and returns an int result. In this example, you’ll see that exceptions are thrown (i.e., the exception occurs) when a method detects a problem and is unable to handle it.

The first sample execution in Fig. H.1 shows a successful division. In the second execution, the user enters the ...
Read now
Unlock full access