• Quentin CharatanEmail author
  • Aaron Kans
Part of the Texts in Computer Science book series (TCS)


By the end of this chapter students should be able to:

  • explain the term exception;

  • distinguish between checked and unchecked exception classes in Java;

  • claim an exception using a throws clause;

  • throw an exception using a throw command;

  • catch an exception in a try…catch block;

  • use a finally block or a try-with-resources construct to deal with clean-up issues;

  • use the Optional class to avoid NullPointerException errors;

  • define and use their own exception classes

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.University of East LondonLondonUK

Personalised recommendations