Re: Expanding arrays

1998-09-09 Thread Christopher Hinds
Sounds like you need a Vector object ( java.util.Vector ) Maarten van Leunen wrote: > Howdie, > > Is there a way to expand arrays. Like, I want to put a unknown number of > strings in an array. > > And then "return" the array of Strings in the Method. > > I read one string, and wish to add it to

Re: Expanding arrays

1998-09-08 Thread Wim Ceulemans
>Is there a way to expand arrays. Like, I want to put a unknown number of >strings in an array. > >And then "return" the array of Strings in the Method. > >I read one string, and wish to add it to the array without having to >define the amount of Strings in the array previously. > Why don't you u

Re: Expanding arrays

1998-09-08 Thread Robert Dietrick
You probably want to use a Vector. import java.util.Vector; Vector vec = new Vector(); Then, to add an element, use: vec.addElement(someString); to retrieve an element, you can use: String myString = (String)(vec.elementAt(index)); (you've got to cast the returned object into a String) -Rob

Re: Expanding arrays

1998-09-08 Thread Michael Sinz
On Tue, 08 Sep 1998 17:59:26 +0200, Maarten van Leunen wrote: >Howdie, > >Is there a way to expand arrays. Like, I want to put a unknown number of >strings in an array. > >And then "return" the array of Strings in the Method. > >I read one string, and wish to add it to the array without having to

Re: Expanding arrays

1998-09-08 Thread Jeffery Eddings
On expanding arrays... Maarten van Leunen wrote: > > Is there a way to expand arrays. Like, I want to put a unknown number of > strings in an array. > > And then "return" the array of Strings in the Method. > > I read one string, and wish to add it to the array

Re: Expanding arrays

1998-09-08 Thread Keith T. Garner
On Tue, Sep 08, 1998 at 05:59:26, Maarten van Leunen said: > Is there a way to expand arrays. Like, I want to put a unknown number of > strings in an array. > > And then "return" the array of Strings in the Method. > > I read one string, and wish to add it to the array without having to > define

Expanding arrays

1998-09-08 Thread Maarten van Leunen
Howdie, Is there a way to expand arrays. Like, I want to put a unknown number of strings in an array. And then "return" the array of Strings in the Method. I read one string, and wish to add it to the array without having to define the amount of Strings in the array previously. -- Maarten van