Throwable类getStackTrace()方法 (Throwable Class getStackTrace() method)
getStackTrace() Method is available in java.lang package.
getStackTrace()方法在java.lang包中可用。
getStackTrace() Method is used to return an array of StackTraceElement and every element in an array denotes one stack frame.
getStackTrace()方法用于返回一个StackTraceElement数组,并且数组中的每个元素都表示一个堆栈帧。
As we know that the first element of the array denotes the top of the stack and the last element of the array denotes bottom of the stack (i.e. In a sequence the last method called to represent the top of the stack and in a sequence the first method called represents the bottom of the stack).
如我们所知,数组的第一个元素表示堆栈的顶部,数组的最后一个元素表示堆栈的底部(即,在序列中,调用的最后一个方法表示堆栈的顶部ÿ