Generate different name for objects inside a loop

Hi all,

I need to generate different names for a bean object inside a while loop. My code will look like this:

while(true)

{

FileDetails_Bean j_bean_f =new FileDetails_Bean();

j_bean_f.setpath(File_path);

j_bean_f.setname(File_name);

j_bean_f.setsize(File_size);

j_bean_f.settype(File_type);

j_bean_f.settime(File_time);

}

i need to generate different names for the bean object.Plz help.....Thx in advance!

[632 byte] By [NewJavabeea] at [2007-11-27 0:18:43]
# 1
What does "name" mean, and what is this ugly non-standard code-naming-convention supposed to help with?
CeciNEstPasUnProgrammeura at 2007-7-11 22:09:14 > top of Java-index,Java Essentials,Java Programming...
# 2
You can't dynamically create variable names, if thats what you mean. You can use a Map to store objects retrievable by a key.
Herko_ter_Horsta at 2007-7-11 22:09:14 > top of Java-index,Java Essentials,Java Programming...
# 3
Context is here: http://forum.java.sun.com/thread.jspa?threadID=5157898
pbrockway2a at 2007-7-11 22:09:14 > top of Java-index,Java Essentials,Java Programming...