Over a million developers have joined DZone.

Get Name Of Current Method In Java

·
// description of your code here


String methodName = Thread.currentThread().getStackTrace()[1].getMethodName();
Topics:

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

{{ parent.tldr }}

{{ parent.urlSource.name }}