Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx01.iad01.newshosting.com!newshosting.com!news-out.readnews.com!transit3.readnews.com!postnews.google.com!v33g2000prm.googlegroups.com!not-for-mail From: whl Newsgroups: comp.lang.java.programmer Subject: Re: A freshman's question Date: Thu, 20 Oct 2011 03:55:06 -0700 (PDT) Organization: http://groups.google.com Lines: 33 Message-ID: <611215f5-56c3-4749-8a0d-3fd27bf2dede@v33g2000prm.googlegroups.com> References: <3242b80f-ee51-45f0-9e12-231482f61a97@r2g2000prh.googlegroups.com> <37KdnWZAYfIR1QPTnZ2dnUVZ_vWdnZ2d@earthlink.com> <02a66b06-651a-46c8-9a09-64442a73a959@s17g2000prm.googlegroups.com> <4df1e05a-295c-4c60-9baf-0e69cd4ee507@r2g2000prh.googlegroups.com> <4E9EF14F.1040904@telia.com> NNTP-Posting-Host: 210.30.49.103 Mime-Version: 1.0 Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1319108188 26187 127.0.0.1 (20 Oct 2011 10:56:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 20 Oct 2011 10:56:28 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: v33g2000prm.googlegroups.com; posting-host=210.30.49.103; posting-account=HTLLjQoAAACz0TvVcFSbbOMA5uM_lEjQ User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-Header-Order: HNKRUAELSC X-HTTP-UserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.218 Safari/535.1,gzip(gfe) Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9023 On 10=D4=C220=C8=D5, =C9=CF=CE=E712=CA=B124=B7=D6, Tim Slattery wrote: > Lars Enderin wrote: > >1) i =3D 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 =3D=3D 0. > > No question. > > >2) i =3D 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 =3D=3D 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!