How can I name a stack after a string name

Accroding to the strings which I got from the clients,I want to generate some stacks, name these stacks after the content of strings.I try to cast string into stack, but it does not work.Can anybody give a tip?Thanks a lot.
[251 byte] By [kanejohn1] at [2007-9-30 14:33:04]
# 1

Hi,

You got strings from the client in what form? String[] array?

String[] tokens=com.neuralworks.stringio.StringSmith.tokenize(_2ThetaLimits, " ");

Stack<String> lifo=new Stack<String>();

for(int index=0;index<tokens.length;index++)

{

lifo.push(tokens[index]);

}

Something like this?>

Martin3 at 2007-7-5 13:56:19 > top of Java-index,Administration Tools,Sun Connection...
# 2

thanks for you reply.

In fact, I want generate some stacks according to the different sessionId of the users. So,I can use unique stack for each user. In java servlet ,for example:

String sessionID=session.getId();

String QuestionStack=sessionID+"question";

String ResultStack=session+"result";

My intention is to generate QuestionStack and ResultStack as the instance names of Stacks.

Thanks a lot!

kanejohn1 at 2007-7-5 13:56:19 > top of Java-index,Administration Tools,Sun Connection...