September 2011
Beginner
650 pages
15h 47m
English
As stated earlier, you can associate more than one catch statement with a try. In fact, it is common to do so. However, each catch must catch a different type of exception. For example, the program shown here catches both array boundary and divide-by-zero errors:

As the output confirms, each catch statement responds only to its own type of exception.
In general, catch expressions are checked in the order in which they occur in a program. Only a matching statement is executed. All other catch blocks are ignored.
Read now
Unlock full access