This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Game Development and the fly likes Variable name from a string Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Reply locked New topic
Author

Variable name from a string

Tim Porritt
Greenhorn

Joined: Jul 22, 2012
Posts: 4
Hi i'm not sure if this is possible or not, but i want to get a variable name from a string.
My code so far is as follows:



I'll add the rest of the alphabet later.

Thanks in advance for any help given.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11150
    
  16

closing duplicate post


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Variable name from a string
 
Similar Threads
Caesar cipher
NoSuchMethodError
Add a letter to the end of a variable name
Programming Diversion 2a: Applying a Key
A contradiction....(Kahlid Mughal & Sun Java Tutorial)