Multiple choice

Which of the following methods of Throwable class sends the stack trace to the specified stream?

  1. printStackTrace()

  2. fillInStackTrace()

  3. printStackTrace(PrintStream stream)

  4. toString()

  5. getLocalizedMessage()

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

This method of Throwable class sends the stack trace to the specified stream.