Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #14087
| From | Arivald <NOSPAMarivald@interia.pl> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: iteration |
| Date | 2012-05-01 19:39 +0200 |
| Organization | Dialog Net |
| Message-ID | <jnp79h$dp5$1@news.dialog.net.pl> (permalink) |
| References | <27598671.190.1335882575014.JavaMail.geo-discussion-forums@ynbq3> <dLOdnTXMZf-ZagLSnZ2dnUVZ_rCdnZ2d@earthlink.com> |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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