✏️ Explanatory Question

What is the function of the catch block in exception handling? Where does it appear in a program? Solution:

👁 40 Views
📘 Detailed Answer
🟢 Easy
💡

Answer with Explanation

The catch block in Java contains statements that handle an exception raised within the try block.
It appears immediately after the try block.