print out the name of the current method

 

 

String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
System.out.println(methodName);

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326448174&siteId=291194637