CHAPTER 11

image

Exceptions and Assertions

9781430247647_unFig11-01.jpg

In this chapter, you’ll learn about Java’s support for exception handling in detail. You’ll first learn the basic concepts behind exception handling and then you’ll learn how to throw, catch, and rethrow exceptions. You’ll also learn about the recently added language features such as try-with-resources and multi-catch statements. Following that, you’ll learn how to define your own exception classes (custom exceptions). Finally, we’ll discuss the related topic of assertions and teach you how to use them in ...

Get Oracle Certified Professional Java SE 7 Programmer Exams 1Z0-804 and 1Z0-805: A Comprehensive OCPJP 7 Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.