This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Get a stack trace from Thread.getStackTrace(). Examine the StackTraceElement objects, to see how you got to where you are.
Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Joined: Oct 30, 2001
You don't say why you want this information. If it's just for tracing, diagnostics or maybe assertion, that's fine. If you're thinking of writing logic that depends on who called the method, think again - that's appalling design.