And if u know how do those stacks work I would be really glad if you could tell me how , I now idea of stack I know how it should work but I just not know what this code mean for example StackTraceElement[] stack = Thread.currentThread().getStackTrace(); ? if smb could tell me in easy way with easy words just code and this method element.getLineNumber() and this one for (StackTraceElement element : sladStosuElementy) { System.out.println(element.getMethodName()); } or if there is any article about it said in easy way . I repeat I know the idea of stack and how it should work I just rly don't understand those codes :(