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 apologize

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