Title: Key Concept - Exceptions
Course: CPS 189: Java Certification - Review, Practice & Prepare (Development) > Section: Learning Modules

An exception is an event that disrupts the normal flow of an application.

There are three kinds of exceptions in Java:

A checked exception is an error that an application must have code to anticipate and handle.

An error results from a problem outside the application. The application may or may not have code to anticipate and handle it.

A runtime exception results from a problem inside the application. The application may or may not have code to anticipate and handle it.

There are two methods for anticipating and handling an exception:

A try statement that catches the exception.

A method that throws the exception.

For additional study, view resources under:

- Level 1 Study Materials: Unit 11
- Level 1 Study Materials: Unit 12
- Level 2 Study Materials: Unit 1