How to handle the exception, enclosed the code that might throw an exception within a?
Answers
Answered by
4
Answer:
Java try block is used to enclose the code that might throw an exception. It must be used within the method.
If an exception occurs at the particular statement of try block, the rest of the block code will not execute. So, it is recommended not to keeping the code in try block that will not throw an exception.
Java try block must be followed by either catch or finally block.
Similar questions