What does `super(message)` do in a custom exception class?

  1. Prints message
  2. Saves message in JVM logs
  3. Passes message to Exception superclass
  4. Throws exception
Correct answer Passes message to Exception superclass

Explanation

super(message) passes the message to the parent constructor of the exception.

Update: Admin added a tag on this question

Topics

By Admin · · 35 views