Multiple choice

Which of the following methods of the Throwable class returns null, if there is no underlying exception found?

  1. getClause()

  2. getMessage()

  3. getLocalizedMessage()

  4. both (1) and (2)

  5. none of the above

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

Yes, this method is used to return the exception that underlies the current exception and it returns null, if no such exception found.