When is the code within a catch block executed?

When is the code within a catch block executed?




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


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


Learn More :