Chapter 6Exceptions
OCA exam objectives covered in this chapter:
- Handling Exceptions
- Differentiate among checked exceptions, unchecked exceptions and Errors
- Create a try-catch block and determine how exceptions alter normal program flow
- Describe the advantages of Exception handling
- Create and invoke a method that throws an exception
- Recognize common exception classes (such as NullPointerException, ArithmeticException, ArrayIndexOutOfBoundsException, ClassCastException)
Many things can go wrong in a program. Java uses exceptions to deal with some of these scenarios. The OCA exam covers only the basics of working with exceptions. The rest ...
Get OCA: Oracle Certified Associate Java SE 8 Programmer I Study Guide: Exam 1Z0-808 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.