✏️ Explanatory Question
We handle exceptions using a try-catch block.
The try block contains code that may throw an exception.
The catch block handles it.
Example:
try {
int result = 10 / 0;
} catch (ArithmeticException e) {
System.out.println("Error: " + e.getMessage());
}