Hi,
How can I print the class and method that is presently running?
For example, if my class that contains main() is called HelloWorld I want to
print out "HelloWorld main".
I would like to use System.out.println() to do it.
TIA
Roy
Martin Weiss - 05 Nov 2006 22:24 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> TIA
> Roy
for the class .. this.getClass() should give you the HelloWorld thing ..
I'm not sure about the method part though :S
Ingo R. Homann - 06 Nov 2006 12:22 GMT
Hi Roy,
Take a look at the docu of Exception.getStackTrace()!
Hth,
Ingo