🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Simple question for gurus ;)

#8529
From: John Good
Date: Mon, 19 Mar 2001 20:29
24 lines
1673 bytes
I've got a strange problem with Java, it's probably a feature, but please
point me to solving this.

If I have something like:

public void test(int param) { param = 5;
}

and practically want to set the param to 5 (I do not want to use return,
please!), and when I call it from another method, like:

public void example(){
        int example_parameter = 0;
        test( example_parameter );
        System.out.println("parameter: " + example_parameter);
}

I'll get the 0 as the output, and I want 5; how to assign a value a
parameter? (pointers I miss you ;)
I've checked some books on that, but as allways its not in it, because it's
"too obvious"...

plz help :)
Technical Details
Message-ID: <Z_tt6.19$xH3.1481@psinet-eu-nl>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,a90669a07786d662,start
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-19 12:30:08 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!logbridge.uoregon.edu!news.tele.dk!193.190.198.17!newsfeeds.belnet.be!news.belnet.be!psinet-eu-nl!not-for-mail
From: "John Good" <dumster@collector.org>
Newsgroups: borland.public.jbuilder.java.language
Subject: Simple question for gurus ;)
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
Message-ID: <Z_tt6.19$xH3.1481@psinet-eu-nl>
Date: Mon, 19 Mar 2001 21:29:30 +0100
NNTP-Posting-Host: 195.114.201.103
X-Complaints-To: abuse@uk.psi.com
X-Trace: psinet-eu-nl 985033785 195.114.201.103 (Mon, 19 Mar 2001 20:29:45 GMT)
NNTP-Posting-Date: Mon, 19 Mar 2001 20:29:45 GMT
Organization: Connectivity but not content by PSINet