Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #9023
| From | whl <wanghailunmail@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: A freshman's question |
| Date | 2011-10-20 03:55 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <611215f5-56c3-4749-8a0d-3fd27bf2dede@v33g2000prm.googlegroups.com> (permalink) |
| References | (2 earlier) <02a66b06-651a-46c8-9a09-64442a73a959@s17g2000prm.googlegroups.com> <F4mdnVWUC_HXFQPTnZ2dnUVZ_oednZ2d@earthlink.com> <4df1e05a-295c-4c60-9baf-0e69cd4ee507@r2g2000prh.googlegroups.com> <4E9EF14F.1040904@telia.com> <g8ut97dqh0067547ck6pcj9h0aiiq27lao@4ax.com> |
On 10月20日, 上午12时24分, Tim Slattery <Slatter...@bls.gov> wrote: > Lars Enderin <lars.ende...@telia.com> wrote: > >1) i = 0; > > inc.fermin(i); > >The method fermin() is useless. It has no effect. The parameter is not > >the same i, just a copy of the actual value. The statement i++; in the > >method has no effect outside the method. > >So i remains == 0. > > No question. > > >2) i = i++; > >This is an assignment. First, the expression i++ is evaluated. Its value > >is 0, the initial value of i. This 0 is then assigned to i, which thus > >remains == 0. > > Lessee....I think this is the sequence: > > 1. evaluate i, that yields 0 > 2. increment i, so that i is 1 for a second. > 3. Now assign the value you got from evaluating i in step 1 to i. So i > is reset to 0. > > Does that sound right? > > -- > Tim Slattery > Slatter...@bls.govhttp://members.cox.net/slatteryt thank you ,I have understand!this is a very simple question ,maybe I put this complicated matters! I often make some simple questions to complex!
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar
A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-18 20:08 -0700
Re: A freshman's question Patricia Shanahan <pats@acm.org> - 2011-10-19 04:48 +0100
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-19 00:54 -0700
Re: A freshman's question Patricia Shanahan <pats@acm.org> - 2011-10-19 09:20 +0100
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-19 03:38 -0700
Re: A freshman's question Lars Enderin <lars.enderin@telia.com> - 2011-10-19 17:48 +0200
Re: A freshman's question Tim Slattery <Slattery_T@bls.gov> - 2011-10-19 12:24 -0400
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-20 03:55 -0700
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-20 03:50 -0700
Re: A freshman's question Lew <lewbloch@gmail.com> - 2011-10-19 09:58 -0700
Re: A freshman's question Patricia Shanahan <pats@acm.org> - 2011-10-19 18:47 +0100
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-20 03:48 -0700
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-19 03:49 -0700
Re: A freshman's question Patricia Shanahan <pats@acm.org> - 2011-10-19 18:58 +0100
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-20 02:13 -0700
Re: A freshman's question Arved Sandstrom <asandstrom3minus1@eastlink.ca> - 2011-10-19 06:05 -0300
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-19 03:38 -0700
Re: A freshman's question Travers Naran <tnaran@gmail.com> - 2011-10-20 07:30 -0700
Re: A freshman's question Gene Wirchenko <genew@ocis.net> - 2011-10-20 10:08 -0700
Re: A freshman's question Patricia Shanahan <pats@acm.org> - 2011-10-20 18:22 +0100
Re: A freshman's question Lew <lewbloch@gmail.com> - 2011-10-20 13:59 -0700
Re: A freshman's question Joshua Cranmer <Pidgeot18@verizon.invalid> - 2011-10-20 17:38 -0500
Re: A freshman's question Roedy Green <see_website@mindprod.com.invalid> - 2011-10-19 23:56 -0700
Re: A freshman's question whl <wanghailunmail@gmail.com> - 2011-10-20 03:55 -0700
csiph-web