java程序:错在哪里?
谁能告诉我以下程序错在哪?
What is the result of attempting to compile and run the
following program ?
class IM{
static void swap(int x, int y)
{
int temp = x;
x = y;
y = temp;
}
public static void main(String args[ ])
{
int a = 1;
int b = 2;
swap(a, b);
System.out.print(a +","+b );
}
}
?什么意思
追答What is the result of attempting to compile and run the
following program ? 翻译就是 这个程序最后的结果是什么? 结果就是 打印 1,2