This content has been marked as final. Show 4 replies
You don't. Let's go back to the simple question before that one. You know, the simple question to which "Let's get the variable name as a string" was the answer.
Indeed. If the OP can provide the requirements for which "get the variable name as a string" was the best answer s/he could come up with, I'm supremely confident that a better answer can be supplied. The typical answer is, "Use a Map," but one never knows...
I agree. This is a classic example of the [shotgun problem|http://forums.sun.com/thread.jspa?threadID=5355345&tstart=15] question
StringBuilder sb = new StringBuilder(); sb.add(new Long(6354)); sysout sb.toString();