Multiple choice

Which of the following methods of the Throwable class returns the description of the exception in java?

  1. getClause()

  2. getMessage()

  3. printStackTrace()

  4. String toString()

  5. None of the above

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

Yes, this method is used to return the description of the message in Throwable class.