Exceptions and Assertions


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 the O’Reilly learning platform.

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