When is the code within a catch block executed?

When is the code within a catch block executed?


a. When the exception specified in the catch block is thrown in the try block
b. When a runtime error occurs
c. When the try block finishes executing
d. When the code in the try block doesn't compile


Answer: a. When the exception specified in the catch block is thrown in the try block


Learn More :