Article View: borland.public.jbuilder.java.language
Article #7256can i change a int type Not Integer type argument in a function ?
From: wallance
Date: Thu, 28 Jun 2001 11:26
Date: Thu, 28 Jun 2001 11:26
17 lines
1290 bytes
1290 bytes
hi,
i want to change a int type argument in java,what should i do?
for example:
public func1(){
int i = 10;
func2(i);
System.out.println(i) ===> 11
}
public func2(int arg){
arg = arg + 1;
}
i know in java your can trans a object .then it can modify by reference.
but this is int type,not object.what should i do?
Technical Details
Message-ID:
<3b3b1371_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!205.231.236.10!newspeer.monmouth.com!news-xfer.siscom.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,9b3cb30cd9a02399,start X-Google-Attributes: gidf74b3,public X-Google-ArrivalTime: 2001-06-28 04:38:18 PST From: "wallance" <wallance@sh.ctil.com> Newsgroups: borland.public.jbuilder.java.language Subject: can i change a int type Not Integer type argument in a function ? Date: Thu, 28 Jun 2001 19:26:23 +0800 Lines: 19 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: 61.170.150.134 Message-ID: <3b3b1371_2@dnews> X-Trace: dnews 993727345 61.170.150.134 (28 Jun 2001 04:22:25 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!newsfeed.google.com!sn-xit-02!supernews.com!news.tele.dk!205.231.236.10!newspeer.monmouth.com!news-xfer.siscom.net!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp-relay.ihug.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews