Is there a way to get the name of the currently executing method in Java?
String methodName =Thread.currentThread().getStackTrace()[1].getMethodName(); System.out.println("methodName = " + methodName);