Sounds like a beginner's question. And Raghavan Muthu is right; you ought to start a new thread about bindings.
Remember that args as passed to the main method is an array of String, and s is a String. All you need to do to assign one of the Strings in args is to extract it from the array. Use the usual techniques for array member access.
Joined: Oct 13, 2005
I don't think you can get the variable name from anything at Runtime. The nearest I can think of at the moment would be use that String as a key in a Map.
A solution that will provide you the ability to analyze and manipulate your code at runtime is e.g. BCEL BCEL can extract the required information, and to answer your question. Take a closer look at e.g local variable and field When this is the type of information you required, BCEL can resolve your issue. [ January 01, 2008: Message edited by: Arnold Reuser ]