public class Test 
{
 
	public void test()
	{
		StackTraceElement[] stacks = new Throwable().getStackTrace();
		StackTraceElement currentStack = stacks[ 0 ];
		System.out.println("my class : " + currentStack.getClassName());
		System.out.println("my method : " + currentStack.getMethodName());
	}

	public static void main( String[] args )
	{
		new Test().test();
	}

}