Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Help > Re: iterating t...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 11 Topic 15994 of 16204
Post > Topic >>

Re: iterating through an array of String's

by Thufir <hawat.thufir@[EMAIL PROTECTED] > Apr 30, 2008 at 03:43 AM

On Apr 20, 3:04 am, Roedy Green <see_webs...@[EMAIL PROTECTED]
>
wrote:
> On Sun, 20 Apr 2008 08:50:00 GMT, thufir <hawat.thu...@[EMAIL PROTECTED]
>
> wrote, quoted or indirectly quoted someone who said :
>
> >    data = DATA[0];
> >                        System.out.println(DATA);
>
> println is not smart enough to print an entire array. You need an
> extra layer of loop to print out the elements one at a time with print
> with a println at the end of the row.

A similar situation (here, just a method):


	public static void print(Object[] array){
		List list = Arrays.asList(array);
		for(Object element : list){
			System.out.println(element.toString());
		}
	}


I haven't fully tested it out, but I've tried passing a String[] and
am still getting memory pointers.


-Thufir
 




 11 Posts in Topic:
iterating through an array of String's
thufir <hawat.thufir@[  2008-04-20 08:50:00 
Re: iterating through an array of String's
Roedy Green <see_websi  2008-04-20 10:04:03 
Re: iterating through an array of String's
Thufir <hawat.thufir@[  2008-04-30 03:43:18 
Re: iterating through an array of String's
Roedy Green <see_websi  2008-04-20 10:05:35 
Re: iterating through an array of String's
voorth <voorth@[EMAIL   2008-04-21 03:51:03 
Re: iterating through an array of String's
Lew <lew@[EMAIL PROTEC  2008-04-21 07:12:00 
Re: iterating through an array of String's
thufir <hawat.thufir@[  2008-04-21 07:58:23 
Re: iterating through an array of String's
thufir <hawat.thufir@[  2008-04-21 10:34:52 
Re: iterating through an array of String's
Ian Kidder <ikidder@[E  2008-04-22 06:44:11 
Re: iterating through an array of String's
thufir <hawat.thufir@[  2008-04-23 04:06:25 
Re: iterating through an array of String's
Lew <lew@[EMAIL PROTEC  2008-04-23 00:19:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Jul 9 7:07:32 CDT 2008.