注意:此页面搜索的是所有试题
题目内容
(国际开放大学Java语言程序设计)
下列代码段的运行结果为( )。
public class Test {
public static void main (String[] args){
int a = 30;
int b = 20;
int tmp = a;
a = b;
b = tmp;
System.out.println(a+","+b);
}
}
A.30,20 B.20,20
C.30,30 D.20,30
public class Test {
public static void main (String[] args){
int a = 30;
int b = 20;
int tmp = a;
a = b;
b = tmp;
System.out.println(a+","+b);
}
}
A.30,20 B.20,20
C.30,30 D.20,30
参考答案