32.7k views
2 votes
When you catch an Exception object, you can call ____ to display a list of methods in the call stack so you can determine the location of the statement that caused the exception.

User RickDT
by
4.9k points

1 Answer

4 votes

Answer:

printStackTrace()

Step-by-step explanation:

printStackTrace() :- This method is present in Java.lang.Throwable class and it prints this Throwable it also prints other details with throwable like backtrace and class name. printStackTrace() prints a stack trace for this Throwable object on the output stream of standard error. So we conclude that the answer is printStackTrace().

User Andrew Truckle
by
5.4k points