Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #14087

Re: iteration

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-01.news.neostrada.pl!news.dialog.net.pl!not-for-mail
From Arivald <NOSPAMarivald@interia.pl>
Newsgroups comp.lang.java.programmer
Subject Re: iteration
Date Tue, 01 May 2012 19:39:21 +0200
Organization Dialog Net
Lines 22
Message-ID <jnp79h$dp5$1@news.dialog.net.pl> (permalink)
References <27598671.190.1335882575014.JavaMail.geo-discussion-forums@ynbq3> <dLOdnTXMZf-ZagLSnZ2dnUVZ_rCdnZ2d@earthlink.com>
NNTP-Posting-Host dynamic-78-8-104-94.ssp.dialog.net.pl
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Trace news.dialog.net.pl 1335894129 14117 78.8.104.94 (1 May 2012 17:42:09 GMT)
X-Complaints-To abuse@dialog.net.pl
NNTP-Posting-Date Tue, 1 May 2012 17:42:09 +0000 (UTC)
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120418 Thunderbird/12.0
In-Reply-To <dLOdnTXMZf-ZagLSnZ2dnUVZ_rCdnZ2d@earthlink.com>
X-Antivirus avast! (VPS 120501-0, 2012-05-01), Outbound message
X-Antivirus-Status Clean
X-Received-Bytes 1624
Xref csiph.com comp.lang.java.programmer:14087

Show key headers only | View raw


W dniu 2012-05-01 16:45, Patricia Shanahan pisze:
> On 5/1/2012 7:29 AM, bob wrote:
>> What's the name of this type of iteration in Java?
>>
>> for (Player p : players)
>> {
>>
>> }
>>
>> I haven't seen this until recently.
>
> "enhanced for statement"

Yet most coders (ones capable of coding not only in Java) call it 
"foreach" or "for each".
This name exactly describe intent of this kind of loop, "execute some 
code for every element in collection".

http://en.wikipedia.org/wiki/Foreach_loop

-- 
Arivald

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

iteration bob <bob@coolfone.comze.com> - 2012-05-01 07:29 -0700
  Re: iteration Patricia Shanahan <pats@acm.org> - 2012-05-01 07:45 -0700
    Re: iteration Arivald <NOSPAMarivald@interia.pl> - 2012-05-01 19:39 +0200
  Re: iteration markspace <-@.> - 2012-05-01 08:59 -0700
  Re: iteration Roedy Green <see_website@mindprod.com.invalid> - 2012-05-01 13:39 -0700
  Re: iteration Arne Vajhøj <arne@vajhoej.dk> - 2012-05-01 18:47 -0400

csiph-web