以下代码输出结果为:public class Main { public static void main(String args[]) { String x = null; giveMeAString(x); System.out.println(x); } static void giveMeAString(String y) { y = "RUNOOB"; } }
(A)RUNOOB
(B)null
(C)编程错误
(D)发生异常
参考答案
继续答题:下一题


更多java基础知识试题
- 1在JAVA中ArrayList类实现了可变大小的数组,便于遍历元素和随机访问元素,已知 获得了ArrayList类的对象bookTypeList,则下列语句中能够实现判断列表中是否存在字符串“小说”的是
- 2哪个修饰符定义了方法与属性只能在同一个类中访问?
- 3在java中下列关于自动类型转换说法正确的是
- 4以下代码输出结果为:public class Main { public static void main(String args[]) { String x = null; giveMeAString(x); System.out.println(x); } static void giveMeAString(String y) { y = "RUNOOB"; } }
- 5this和super: ( )