单项选择题
A. A a = new A();
B. A[] a = new A[];
C. A[] a = new A[10];
D. 以上皆错
单项选择题 运行时,数组以哪种方式存在?()
单项选择题 程序: class TestReference{ public static void main(String[] args){ int x=2; TestReference tr = new TestReference(); System.out.print(x); tr.change(x); System.out.print(x); } public void change(int num){ num = num + 1; } } 程序运行后的输出是哪项?()
单项选择题 程序: class TestApp{ public static void main(String[] args){ System.out.println(multiply(2,3,4,5)); } public int multiply(int[] nums){ int result = 1; for(int x :nums) result *= x; return result; } } 程序运行后的输出是哪项?()