Over a million developers have joined DZone.

Get Current Method Name

·
gets the name of the currently excecuted method


public void funkyMethod() {
System.err.println(new Exception().getStackTrace()[0].getMethodName());
}
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}