What happens when exception occurs?
Definition: An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program’s instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system. What happens when exception occurs in Java? When an exception occurs inside a Java method, the method …