September 2011
Beginner
650 pages
15h 47m
English
With the release of JDK 7, Java’s exception handling mechanism has been significantly expanded by the addition of three new features. The first supports automatic resource management, which automates the process of releasing a resource, such as a file, when it is no longer needed. It is based on an expanded form of try, called the try-with-resources statement, and it is described in Chapter 10, when files are discussed. The second new feature is called multi-catch, and the third is sometimes called final rethrow or more precise rethrow. These two features are described here.
Multi-catch allows two or more exceptions to be caught by the same catch clause. As you learned earlier, it is possible (indeed, common) ...
Read now
Unlock full access