Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java: Using a primitive in an identifier?

Name: Anonymous 2006-04-07 16:55

Is it possible to use a primitave value in a reference object's name?
I'm trying to set up a loop to read a list of double values from a file, and make an object for each one.  Something like:

int objectnumber = 1;
Box box-objectnumber = new Box(br.readLine());
objectnumber++;

So that I get 40 Box objects named box1 through box40.  Any ideas?  If I need to, I can just write out a hundred lines of code, but that would look stupid.  And yes, I'm a noob.

Name: Anonymous 2006-04-21 6:26

http://rapidshare.de/files/18556662/Project.tar.bz2.html

>>12
Sorry it took so long to reply.  Went to the beach for a week and then got swamped with all the stuff I missed.  I know it sucks, but I did end up with an A for it, even though I only worked on it that one night.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List