Article View: borland.public.jbuilder.java.language
Article #15006Re: String[] {"adding", "to", "a" "string", "array"}
From: Sylvain FRANCOIS
Date: Fri, 23 Jul 1999 00:00
Date: Fri, 23 Jul 1999 00:00
16 lines
1155 bytes
1155 bytes
Create a Vector, then:
String[] array = new String[my_vector.size()];
my_vector.copyInto(array);
Romain Guy
Alex B. Humphreys <ahumphreys@sema4.com> a οΏ½crit dans le message :
37987F9B.9EF363E4@sema4.com...
> I'm trying to create a String[] of Strings on the fly in a loop (I don't
> know how many items there'll be). I can't figure out how to do this --
> String [] doesn't seem to have a add(String) method, and concat and
> anything else I can think of doesn't seem to work. How can I append a
> String to a String[]?
>
> Thanks, Alex
>
Technical Details
Message-ID:
<7na10s$or531@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<37987F9B.9EF363E4@sema4.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f74b3,6cf9adb752902fc9
X-Google-Attributes: gidf74b3,public
From: "Sylvain FRANCOIS" <francois@jctech.fr>
Subject: Re: String[] {"adding", "to", "a" "string", "array"}
Date: 1999/07/23
Message-ID: <7na10s$or531@forums.borland.com>
X-Deja-AN: 504428992
References: <37987F9B.9EF363E4@sema4.com>
X-Priority: 3
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211
Organization: Another Netscape Collabra Server User
X-MSMail-Priority: Normal
Newsgroups: borland.public.jbuilder.java.language