Home >Java >javaTutorial >How to get the name of the current method in Java?
Get the name of the current method
<span style= "font-family:Arial;font-size:14px;" >String methodName = Thread.currentThread().getStackTrace()[ 1 ].getMethodName(); </span>
The above is the detailed content of How to get the name of the current method in Java?. For more information, please follow other related articles on the PHP Chinese website!