🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Altering data with a method call

#7170
From: Mica Cooper
Date: Sun, 08 Jul 2001 18:09
24 lines
1605 bytes
David,

Simple pass the object and modify it. You can return the object for
readability but it will do nothing. When you pass an object a pointer gets
passed, not the object. Hope that helps,

Mica


"David Chandler" <davidschandler@netzero.net> wrote in message
news:3B4812BB.F35B508E@netzero.net...
> I am moving from Pascal to Java.  In Pascal you could pass either values
or
> variables to a procedure.  Variables get altered so the revised data gets
> passed back.  Java allows you to pass only values.  I can get a single
> return value, but what if I want a method to alter other variables?  Do I
> have to rely on globals?
>
> What is the usual practice here?
>
> --
> David Chandler
>
>
Technical Details
Message-ID: <3b48a04a_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!skynet.be!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews
References: <3B4812BB.F35B508E@netzero.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,1c0aad99b07f6335
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-07-08 11:12:40 PST
From: "Mica Cooper" <Mica_Cooper@microcore.net>
Newsgroups: borland.public.jbuilder.java.language
References: <3B4812BB.F35B508E@netzero.net>
Subject: Re: Altering data with a method call
Date: Sun, 8 Jul 2001 13:09:22 -0500
Lines: 26
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 12.28.57.164
Message-ID: <3b48a04a_2@dnews>
X-Trace: dnews 994615370 12.28.57.164 (8 Jul 2001 11:02:50 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!sn-xit-02!supernews.com!isdnet!skynet.be!news.tele.dk!194.25.134.62!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!dnews