for (Map.Entry entry: System.getenv().entrySet()) {
System.out.println(entry.getKey() + ":" + entry.getValue()); }
由誰呼叫某method
System.out.println(Thread.currentThread().getStackTrace()[1].getMethodName());
System.out.println(Thread.currentThread().getStackTrace()[2].getMethodName()); System.out.println(Thread.currentThread().getStackTrace()[3].getMethodName());
0 意見:
張貼留言