2 Answers
The statements that generate an exception such as “divide by zero” are placed in a try block.
If an exception occurs, it throws an exception such as “divide by zero”.
This block also contains the statements that should not be executed if an exception occurs.