🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #7521

Re: changing reference in a method

#7521
From: Michael Rachow
Date: Mon, 18 Jun 2001 20:40
15 lines
1559 bytes
You are able to assign a reference to another instance but this has impact
inside
that method only.
In that case you use this "former" parameter now as a local variable.
Using final would remove that possibility.
On entry to a method call you get a reference to an object and you can
change
that object by using it's (class) interface.
The place where the reference itself is stored is given by value.
Your method gets a copy of that reference.
So you can set this reference holder to any other reference
but this will have no effect on the reference outside your class.

?!?!
Michael
Technical Details
Message-ID: <3b2e66a2$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3b2ccfc1_1@dnews> <3b2cd6b8_2@dnews> <3b2cde4d$1_2@dnews> <3b2d0dfa_2@dnews> <3b2e2da2_1@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,de239f43bd446264
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-06-18 13:42:22 PST
From: "Michael Rachow" <michael@famrachow.de>
Newsgroups: borland.public.jbuilder.java.language
References: <3b2ccfc1_1@dnews> <3b2cd6b8_2@dnews> <3b2cde4d$1_2@dnews> <3b2d0dfa_2@dnews> <3b2e2da2_1@dnews>
Subject: Re: changing reference in a method
Date: Mon, 18 Jun 2001 22:40:26 +0200
Lines: 17
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200
NNTP-Posting-Host: 217.227.16.95
Message-ID: <3b2e66a2$1_1@dnews>
X-Trace: dnews 992896674 217.227.16.95 (18 Jun 2001 13:37:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews