Skip to main contentSkip to solution

The sequence of steps of exception handling process is:

(A) Exception object is created

(B) Exception is raised

(C) An error is encountered in a method

(D) Runtime system searches for exception handler in the current method

Solution

✅ Correct Option: 4

(C) An error is encountered in a method

(A) The method creates an exception object holding the error type and program state

(B) The exception is raised (thrown) to the runtime system

(D) The runtime system searches for an exception handler, starting in the current method and then moving up the call stack


Options 1 and 2: an exception object cannot exist before an error occurs, so (C) must come first.

Option 3: an exception cannot be raised before its object is created, and the handler search comes after raising, not before the error.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question