Chapter 10Exceptions

OCP exam objectives covered in this chapter:

  • images  Handling Exceptions
    • Describe the advantages of Exception handling and differentiate among checked, unchecked exceptions, and Errors
    • Create try-catch blocks and determine how exceptions alter program flow
    • Create and invoke a method that throws an exception

images Many things can go wrong in a program. Java uses exceptions to deal with some of these scenarios. This chapter focuses on how exceptions are created, how to handle them, and how to distinguish between various types of exceptions ...

Get OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.