Re: casting int as String

From: kevinc (kevinc_at_elp.rr.com)
Date: 11/25/03


Date: Tue, 25 Nov 2003 19:10:08 GMT

Substitute

String list

with

StringBuffer list = new StringBuffer();

list.append(list[i]);

When you want the resultant string

do list.toString();

B J H wrote:
> I want to do the following
>
> int [] list;
> String list;
> i int;
> ....
> for (i=0; i<int.length, i++_
> {
> list.concat(list[i]);
> list.concat(" ");
> }
>
> But list.concat expects a string, and I'm putting a int into it - how can I
> make this work? How can I put an int into string.concat?
>
> Thanks
>
>
>