登录  注册

首页->java基础知识

以下代码输出结果为:class Main {public static void swap(Integer i, Integer j) { Integer temp = new Integer(i); i = j; j = temp; } public static void main(String[] args) { Integer i = new Integer(10); Integer j = new Integer(20); swap(i, j); System.out.println("i = " + i + ", j = " + j); }}

(A)i = 10, j = 20

(B)i = 20, j = 10

(C)i = 10, j = 10

(D)i = 20, j = 20

参考答案
继续答题:下一题
微考学堂微考学社

更多java基础知识试题

考试