No single method in a program \"knows\" where it is on the stack. All it knows is its own little job, and it does that and returns. So when an Exception is thrown and a stack
When you create a Throwable (not when you throw it) it records the stack trace is a low level/hidden way associated with the Throwable. When you call getStackTrace() the first time it creates the StackTraceElement[]
objects from the low level information. It doesn't this lazily as the stack trace is often not used.