Question:

Exception thrown by any statement in try block in a Java program is handled in ................ block.

Show Hint

In Java, always use a catch block to handle exceptions thrown from a try block.
Updated On: Jul 14, 2025
  • final
  • throw
  • catch
  • except
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is C

Solution and Explanation

In Java, exception handling is accomplished using try-catch blocks.
The try block contains code that may throw an exception during execution.
If an exception arises, Java looks for a matching catch block to handle that specific exception type.
The catch block includes code that specifies how to respond to the exception, preventing the program from crashing.
- The final (actually finally) block is used to execute code regardless of whether an exception occurs.
- The throw keyword is used to manually throw an exception.
- The word except is not a Java keyword; it's used in Python.
Therefore, to handle exceptions in Java, the correct keyword is catch.
Was this answer helpful?
0
0