Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 342 Bytes

File metadata and controls

8 lines (6 loc) · 342 Bytes

08 — Error handling & try/catch

Overview

  • Use try / catch to handle exceptions. finally runs regardless.
  • Checked vs unchecked exceptions: checked exceptions must be declared or caught.
  • Prefer specific exception types in catch blocks.

Example: ErrorHandlingExample.java demonstrates try/catch and custom exception handling.