package org.kodejava.example;

public class GetCurrentMethodName {
    public static void main(String[] args) {
        //
        // Get the current executing method name
        //
        String methodName =
                Thread.currentThread().getStackTrace()[1].getMethodName();
        System.out.println("methodName = " + methodName);
 
        GetCurrentMethodName obj = new GetCurrentMethodName();
        obj.executeAMethod();
    }
 
    private void executeAMethod() {
        //
        // Get the current executing method name
        //
        String methodName =
                Thread.currentThread().getStackTrace()[1].getMethodName();
        System.out.println("methodName = " + methodName);
    }
}



1 ··· 7 8 9 10 11 12 13 14 15 ··· 68 

카운터

Total : 33,864 / Today : 1 / Yesterday : 1
get rsstistory!