Article View: borland.public.jbuilder.java.language
Article #7502changing reference in a method
From: Ivan Trotter
Date: Sun, 17 Jun 2001 16:44
Date: Sun, 17 Jun 2001 16:44
23 lines
1392 bytes
1392 bytes
Hi
I have this source:
public class MyObject{
public void SomeMethod(Object anObject);
....
anObject=null;
}
When I call this method, the anObject in params pass referenced, this means
that I can access the content of anObject in SomeMethod, after that I try to
change the reference: anObject = null, and only changes in the method, but
when steps over the method the reference become the same just before the
method call.
How can I assign null to the reference without returning some value in the
method?
I appretiate your help
Ivan Trotter
Technical Details
Message-ID:
<3b2ccfc1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,de239f43bd446264,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-17 08:42:40 PST From: "Ivan Trotter" <ivan@admiraluno.com> Newsgroups: borland.public.jbuilder.java.language Subject: changing reference in a method Date: Sun, 17 Jun 2001 10:44:37 -0600 Lines: 25 X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 NNTP-Posting-Host: 200.65.4.23 Message-ID: <3b2ccfc1_1@dnews> X-Trace: dnews 992792513 200.65.4.23 (17 Jun 2001 08:41:53 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews