Variable names for declared Objects

Well, I don't know how to formalize the topic correctly. I'll try to explain my question.

Is it possible in Java to do something like this:

for (int i = 0; i < 10; i++){

Object"myObject"+i =new Object();

}

So that I have 10 Objects:

myObject0

myObject1

.

.

.

myObject9

greetz

Thinkpositiv

[557 byte] By [Thinkpositiva] at [2007-10-2 17:53:53]
# 1
You might be looking for http://java.sun.com/docs/books/tutorial/java/data/arrays.html
xHackera at 2007-7-13 19:12:22 > top of Java-index,Java Essentials,Java Programming...
# 2
Try the Map suggestion in the following thread: http://forum.java.sun.com/thread.jspa?threadID=634815
MLRona at 2007-7-13 19:12:22 > top of Java-index,Java Essentials,Java Programming...
# 3
Thank you for your quick answers, the Map is what I will use!The hardest problem was to find the right topic to search for :-)greetz and thanks!Thinkpositiv
Thinkpositiva at 2007-7-13 19:12:22 > top of Java-index,Java Essentials,Java Programming...