-
September 17th, 2011, 06:48 AM
#1
Strings in variable names?
So say I have a string called name which maybe be equal to "Sam" or "Max" or maybe "Betty". I'm trying to make a variable that has a different name for each value of name.
For example it might be Samitems or Maxitems or Bettyitems.
Is there anyway way to insert a string into a variable name?
-
September 17th, 2011, 07:38 AM
#2
Re: Strings in variable names?
anyway way to insert a string into a variable name?
You create variable names when you type them into the source code.
If you want to use a String to access a value when the a program is executing, look at the Map class.
Norm
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|