Article View: borland.public.jbuilder.java.language
Article #7277Re: can i change a int type Not Integer type argument in a function ?
From: CLG
Date: Fri, 29 Jun 2001 13:03
Date: Fri, 29 Jun 2001 13:03
38 lines
2450 bytes
2450 bytes
We are saying the same thing. Yea, primitives are passed in the only way possible, by value. I "assumed" that was understood. But object passing is not by value but by reference(the reference is like a primitive). If it were by value, objects would be copied each time they were passed. While the objects are not copied, the references are. That was my original point. No matter what you are technically passing, its a copy (of a primitive). either a copied primitive, or a copied reference. But not a copied object. -- Peace, Carl L. Gilbert http://www.rigidsoftware.com ICQ 614395-currently stolen working to retrieve. "Then said I, Wisdom [is] better than strength: nevertheless the poor man's wisdom [is] despised, and his words are not heard." Ecclesiastes 9:16 "John McGrath [TeamB]" <ng-b@JPMcGrath.net> wrote in message news:MPG.15a5e2518d11ab0b98a2ff@forums.borland.com... > On Thu, 28 Jun 2001 23:25:17 -0400, "CLG" <lamont_gilbert @ > rigidsoftware.com> wrote: > > > Java always passes by reference. > > That is not correct. Java passes primitive values by value. It also > passes object references by value, which is really the same thing as > saying that it passes objects by reference. > > -- > Regards, > > John McGrath [TeamB] > > --------------------------------------------------- > Before sending me e-mail, please read: > http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID:
<3b3c7db7_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3b3b1371_2@dnews> <3b3b7ae2_1@dnews> <3b3bda1e_2@dnews> <3b3bf625$1_1@dnews> <MPG.15a5e2518d11ab0b98a2ff@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9b3cb30cd9a02399 X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-29 06:11:16 PST From: "CLG" <lamont_gilbert @ rigidsoftware.com> Newsgroups: borland.public.jbuilder.java.language References: <3b3b1371_2@dnews> <3b3b7ae2_1@dnews> <3b3bda1e_2@dnews> <3b3bf625$1_1@dnews> <MPG.15a5e2518d11ab0b98a2ff@forums.borland.com> Subject: Re: can i change a int type Not Integer type argument in a function ? Date: Fri, 29 Jun 2001 09:03:41 -0400 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4522.1200 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 NNTP-Posting-Host: 24.181.226.14 Message-ID: <3b3c7db7_2@dnews> X-Trace: dnews 993820087 24.181.226.14 (29 Jun 2001 06:08:07 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews