Couple thoughts...

1. If you could do that, you'd end up renaming the array each time the value
of "i" changed in the loop.  But maybe that's what you wanted.

2. Java syntax doesn't allow an assignment operator to have an expression on
the left-hand side.

Scott Stirling
JRun QA

-----Original Message-----
From: Robert Jacobs
To: JRun-Talk
Sent: 4/17/01 7:34 PM
Subject: Dynamic Naming for Array

I have a question for all of you java programmers out there.

Does anyone know how to dynamically name an object.

I wanted to create and array in a loop and name the array dynamically
based
on the index value for the loop.

etc ......
for(i=0; i<=n;i++) {
Object[] obj_+dynamic value of i+ = new Object[SIZE];
}

Is that possible in Java or will have have to put the object arrays in
the position of another array?  Any help would be appreciated.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to