# 獲取當前的類別和方法名稱 ```java= this.getClass().getSimpleName() + "!" + Thread.currentThread().getStackTrace()[1].getMethodName(); ``` ###### tags: java