Creating arraylists during run-time.

I'm writing a client/server application and want to create arrays during run time. I know this is easily done. But what I want to do is name the lists "clientX" where X is the numerical id of the connected client.

For example, 20 clients connect to the server. I want the server to create an ArrayList for each client upon connection to hold some client specific information. I don't want to predetermine how many clients can connect simultaneously by creating all of the arraylists at the beginning.

Is this possible? Is there perhaps a better solution to what I'm trying to achieve?

Thanks for the help.

[633 byte] By [sdoublea] at [2007-11-27 8:46:50]
# 1
Use a HashMap to store the arraylists in, and use clientX as the key to the map~TimMessage was edited by: SomeoneElse
SomeoneElsea at 2007-7-12 20:50:16 > top of Java-index,Java Essentials,New To Java...
# 2
Use a Map: http://java.sun.com/docs/books/tutorial/collections/interfaces/map.html
BigDaddyLoveHandlesa at 2007-7-12 20:50:16 > top of Java-index,Java Essentials,New To Java...