坏鱼儿6
(坏鱼儿6)
新手上路

初级会员
UID 20166
精华
0
积分 11
帖子 11
金钱 11 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2003-5-26
状态 离线
|
[广告]: q
m
怎样改才能改变值
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;
}
}
|
|