In this chapter, you will learn
- About error handling in Java using exceptions
- How to use try-catch blocks to handle exceptions
- How to use finally blocks to clean up resources
- The different between checked and unchecked exceptions
- How to create a new exception type and use it in your code
- How to use auto-closeable resources using a try-catch-resources block
- How to access the stack frames of a thread
What Is an Exception?
An exception is a condition that may arise during the execution of a Java program when a normal path of execution is not defined. For example, a Java program may encounter a numeric expression that ...