Learning Outcomes
At the end of this lecture, you’ll be able to:
- Design robust methods with Exceptions.
- Write Java code utilizing Java Exceptions.
- Extend Java’s built-in exceptions to create custom exceptions.
- Differentiate when to throw exceptions and when to try/catch the exceptions.
- Write JUnit tests to check whether exceptions are thrown when expected.
- Explain the difference between checked vs. unchecked exceptions.
Lecture Plan
In this lecture, we'll cover the following lessons:
- Java Programs with Exceptions: A robust method
- Java Programs with Exceptions: Unit Testing
- Java Programs with Exceptions: Throw an Exception!
- Java Programs with Exceptions: Exercise⚡
- Java Programs with Exceptions: Custom Exceptions
- Java Interlude: Exception Hierarchies
- Java Interlude: Two Types of Exceptions
- Exercise: LengthException⚡
Lessons marked with ⚡ contain exercise/activity.