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
On Tue, 8 Sep 1998, 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
> define the amount of Strings in the array previously.
>
> --
> Maarten van Leunen
>
> Student - Fontys Institute of Technology Eindhoven
> e-mail: [EMAIL PROTECTED]
> http://www.il.fontys.nl/~maartenl
> http://lok.il.fontys.nl/
>