Can a variable name be declared as List name?

Hi All,

Developing a chat application. Wanted to store the data according to the scope. The scope will be different for different rooms. My doubt is can a variable name(scope name) be declared as a List name? Everytime a new scope is created, a new list has to be generated at the server side.

Thanks and regards,

Pachi

[344 byte] By [Pachia] at [2007-11-15]
# 1

I'm not entirely sure what you're asking (I don't know what a "List name" is, for example), but I think you are asking whether or not it is possible to create dynamic variable names. It isn't.

The common solution is to use a Map, where you use the name as a key and the List as a value.

Herko_ter_Horsta at 2007-7-12 > top of java,Core,Core APIs...