O'Reilly logo

Oracle Certified Professional Java SE 8 Programmer Exam 1Z0-809: A Comprehensive OCPJP 8 Certification Guide by Tushar Sharma, Hari Kiran, S G Ganesh

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 7

image

Exceptions and Assertions

Certification Objectives

Use try-catch and throw statements

Use catch, multi-catch, and finally clauses

Use Autoclose resources with a try-with-resources statement

Create custom exceptions and Auto-closeable resources

Test invariants by using assertions

In this chapter, you’ll learn about Java’s support for exception handling in detail. The OCAJP 8 exam (which is a pre-requisite for OCPJP 8 exam) covers fundamentals of exception handling as an exam topic. Hence, we assume that you are already familiar with the basic syntax used for exception handling and types of exceptions. In this chapter, you’ll learn how ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required