How to give the user given variable name.

Hi all.....

I want to create an object with the variable name taken from the

user.

ie , Object <usergiven name> =new Object();

i am using java 1.4.2_06

Is there any facility available in java for this....

Thanx in advance

Regards

~ Suresh G

[306 byte] By [Suresh.Ga] at [2007-10-2 14:26:37]
# 1
normally you would use a hashmap to achieve this.
watercolour...yesa at 2007-7-13 12:46:44 > top of Java-index,Java Essentials,Java Programming...
# 2
> I want to create an object with the variable name> me taken from the> user.That's discouraged by Java's strong typing. You can easily associate a user given "name" with an object using a HashMap as has been suggested.
watercolour...yesa at 2007-7-13 12:46:44 > top of Java-index,Java Essentials,Java Programming...