An exception can produce a “call stack trace” which lists

An exception can produce a “call stack trace” which lists

a)       the active methods in the order that they were invoked
b)       the active methods in the opposite order that they were invoked
c)       the values of all instance data of the object where the exception was raised
d)       the values of all instance data of the object where the exception was raised and all local variables and parameters of the method where the exception was raised
e)       the name of the exception thrown

Answer:  b.

Explanation:  The call stack trace provides the names of the methods as stored on the run-time stack.  The method names are removed from the stack in the opposite order that they were placed, that is, the earliest method was placed there first, the next method second, and so forth so that the most recently invoked method is the last item on the stack, so it is the first one removed.  The stack trace then displays all active methods in the opposite order that they were called (most recent first).


Enhancing Classes

Learn More Multiple Choice Question :