页:
[1]
|
怎样改才能改变值
public class mySwap{
public static void main(String args[]){
int x = 3;
int y = 6;
swap(x,y);
System.out.println("x = "+x);
System.out.println("y = "+y);
}
public static void swap(int x,int y)
{
int Temp;
Temp = x;
x = y;
y = Temp;
}
} |
| onis_man | 2003-8-6 05:00 PM |
|
| [url]http://www.phpx.com/happy/showthread.php?s=&threadid=34604[/url] |
Powered by Discuz! Archiver 6.1.0
© 2001-2006 Comsenz Inc.
Processed in 0.005772 second(s), 2 queries |