• Online, Self-Paced
Course Description

In this course, you will learn about the correct use of the throws clause, Java's relatively new try-with-resources construct, and the use of custom exceptions. Explore how to correctly use the throws clause while defining method signatures and implementing exception handling in a chain of methods that sequentially call each other. You will learn to ensure that resources are automatically closed, relying on language support, using the try-with-resources construct; and recognize the precise semantics of this construct in Java. This leads to throwing an object of a built-in exception type to respond to an unexpected situation in a program, and differentiating between the semantics of throwing runtime exceptions versus checked exceptions. The correct way to invoke a method that throws an exception of a checked exception type will be examined, along with how to correctly declare or handle exceptions in a chain of functions, each of which throws different types of exceptions. Finally, participants will explore the use of custom exceptions, defining their own exception classes, and then throwing exceptions that belong to those classes.

Learning Objectives

{"discover the key concepts covered in this course"}

Framework Connections

The materials within this course focus on the Knowledge Skills and Abilities (KSAs) identified within the Specialty Areas listed below. Click to view Specialty Area details within the interactive National Cybersecurity Workforce Framework.