But where is the problem ?
package com.codegym.task.task09.task0905;
/*
In the blue depths of the stack trace…
*/
public class Solution {
public static void main(String[] args) throws Exception {
int deep = getStackTraceDepth();
System.out.println(deep);
}
public static int getStackTraceDepth() {
return Thread.currentThread().getStackTrace().length;
}
}