Mega Code Archive
Categories
/
Java
/
Reflection
Get the current method name
public class Main{ public static void main(String args[]) { System.out.println (new Exception().getStackTrace()[0].getMethodName()); } }