Re: Using arrays of objects ?
- From: "Joanna" <forjoanna@xxxxxxxxxxx>
- Date: Sun, 25 Feb 2007 05:22:53 GMT
"TonyB" <tonyb@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:E9JDh.87996$tQ1.64679@xxxxxxxxxxxxxxxxxxxxxxxxx
I'm new to java, and would like some advice on how to keep track of groupsof
of objects where the number of objects is not predefined.
For example say I have a toolbox class which contains an arbitrary number
tool objects. I want to have a method to add a tool to the toolbox object,the
and other methods to list the current contents of the toolbox for example.
I could keep a reference to each tool object as added in an array of type
tool but an array is declared with a fixed length, so short of defining
array to have a some arbitrary large size I can't see how to deal withthis
list of objects. I don't want to use a database at this time.
Is there a better way to do this ?
Tony
here we go
http://cs.gettysburg.edu/~cpresser/java/ForLoopTest.html
Joanna
.
- References:
- Using arrays of objects ?
- From: TonyB
- Using arrays of objects ?
- Prev by Date: Re: Using arrays of objects ?
- Next by Date: Re: Using Visual J# in a first programming course.
- Previous by thread: Re: Using arrays of objects ?
- Next by thread: Re: Using Visual J# in a first programming course.
- Index(es):