Article View: aus.computers.java
Article #867from char[] to String
From: Luke
Date: Thu, 06 Apr 2000 00:00
Date: Thu, 06 Apr 2000 00:00
20 lines
1067 bytes
1067 bytes
Hi,
Can someone help me,
I have a char array that holds 50 chars.
I want to put the characters from the array in to a string.
Something like
<code>
for(i = 0; i < array.length; i++)
String s.charAt(i) = array[i];
System.out.println(s);
</code>
Does anyone know how to do this?
I'm sure there must be an easy way,
Technical Details
Message-ID:
<0yYG4.63874$3b6.245144@ozemail.com.au>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10d6db,b0622beecc4534e1,start X-Google-Attributes: gid10d6db,public From: "Luke" <luke@chipcity.com.au> Subject: from char[] to String Date: 2000/04/06 Message-ID: <0yYG4.63874$3b6.245144@ozemail.com.au> X-Deja-AN: 607461062 Distribution: world Content-Transfer-Encoding: 7bit X-Trace: ozemail.com.au 955012348 203.28.1.117 (Thu, 06 Apr 2000 19:12:28 EST) Organization: OzEmail Pty Ltd, Australia X-MSMail-Priority: Normal X-Priority: 3 Content-Type: text/plain; charset="Windows-1252" MIME-Version: 1.0 NNTP-Posting-Date: Thu, 06 Apr 2000 19:12:28 EST X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Newsgroups: aus.computers.java