Java tutorial
//package com.java2s; public class Main { public static String _FUNC_() { StackTraceElement traceElement = ((new Exception()).getStackTrace())[1]; return traceElement.getMethodName(); } }