Which of the following is true about exception propagation?

  1. Java handles exceptions automatically
  2. Exceptions must be caught in the same method
  3. Unhandled exceptions propagate up the call stack
  4. Only checked exceptions propagate
Correct answer Unhandled exceptions propagate up the call stack

Explanation

Unhandled exceptions are passed up to calling methods (call stack).

Update: Admin added a tag on this question

Topics

By Admin · · 30 views