8. Handling Exceptions

Note:

  • there is overlap between topics, which is unavoidable due to the organisation of the objectives
  • Touched on topics are introduced, but covered in other sections in much greater detail


1. Differentiate among checked exceptions, unchecked exceptions, and Errors


Topics:

  • Error, Checked and Runtime exceptions
  • Exception hierarchy



2. Create a try-catch block and determine how exceptions alter normal program flow

Topics:

  • try-catch and try-catch-finally
  • throws declaration
  • throw new Exception
  • try with resources



3. Describe the advantages of Exception handling

Topics:

  • Benefits of exception handling



4. Create and invoke a method that throws an exception

Topics:

  • declare or handle exceptions



5. Recognize common exception classes (such as NullPointerException, ArithmeticException, ArrayIndexOutOfBoundsException, ClassCastException)

Topics:

  • examples of common exceptions



Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License