客过沙下
小水手

UID 31315
精华
0
积分 6
帖子 6
阅读权限 10
注册 2008-4-22 来自 湘.衡阳
状态 离线
|
有个程序请教一下!
import java.io.PrintStream;
public class exam{
public void swap(int x,int y){
int t;
t=x;
x=y;
y=t;
}
public static void main(String []args){
int m=5;
int n=10;
new exam().swap(m,n);
System.out.println(m,n);
}
}
这个程序为什么在System.out.println(m,n);处出错啊 ?
哪位大侠帮忙解决一下!
|
|