When debugging java code, sometimes it's important to know where you come from. So you can print current stack trace to help you.
1. new Exception().printStackTrace();
2. Thread.currentThread().getStackTrace(); This returns an array of StackTraceElement that represents current stack of your program.