Re: [OT] object[] to string[]

2006-11-10 Thread Chris Pratt
Excelent reply. To simplify your code a bit, you might look at something like: int j=0; String[] strings = new String[list.size()]; Iterator i = list.iterator(); while(i.hasNext()) { strings[j++] = String.valueOf(i.next()); } String.valueOf() will automatically convert everything (including St

Re: [OT] object[] to string[]

2006-11-10 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Miro, 1. Please use your real name in your email address when posting to the list. "temp temp" is a poor moniker. 2. While some of us will be happy to answer "purely" Java questions, please mark such posts as [OT] (for "off-topic") and apologiz

[OT-Friday] Re: object[] to string[]

2006-11-10 Thread Christopher Goldman
On Fri, 2006-11-10 at 16:32 -0500, Monkeyden wrote: > That wasn't very pedantic of you to mispell it. :) "Misspell?" Or was that irony? ;) Ever-pedantic Chris -- Christopher D. Goldman [EMAIL PROTECTED] - To unsubscribe, e

Re: object[] to string[]

2006-11-10 Thread Monkeyden
That wasn't very pedantic of you to mispell it. :) On 11/10/06, Ed Griebel <[EMAIL PROTECTED]> wrote: On 11/10/06, Martin Gainty <[EMAIL PROTECTED]> wrote: > I dont know 'pendantic' so I would suggest System.arrayCopy as in > > (Sorry for being pedantic...) LOL, TGI Friday! :-) -

Re: object[] to string[]

2006-11-10 Thread Ed Griebel
On 11/10/06, Martin Gainty <[EMAIL PROTECTED]> wrote: I dont know 'pendantic' so I would suggest System.arrayCopy as in (Sorry for being pedantic...) LOL, TGI Friday! :-) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additi

Re: object[] to string[]

2006-11-10 Thread Martin Gainty
stribution or copying of it or its contents - Original Message - From: "Ed Griebel" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Friday, November 10, 2006 2:35 PM Subject: Re: object[] to string[] > Maybe I'm just being pendantic, but t

Re: object[] to string[]

2006-11-10 Thread Ed Griebel
Maybe I'm just being pendantic, but this isn't really related to Struts at all. java.util.Arrays and java.util.Collections provide a lot of methods to transform between arrays and collections. You will find your answer after some reading and some experimentation. On 11/10/06, temp temp <[EMAIL P

object[] to string[]

2006-11-10 Thread temp temp
I want contents of java.util.list as string array Object aObject[]= list.toArray(); How can I cast this to string []? Thanks & Regards Miro - Everyone is raving about the all-new Yahoo! Mail beta.