问题描述:
[单选]
下面的方法,当输入为2的时候返回值是多少?()public static int getValue(int i) {int result = 0;switch (i) {case 1:result = result + i;case 2:result = result + i * 2;case 3:result = result + i * 3;}return result;}
A.0
B.2
C.4
D.10
参考答案:查看无
答案解析:无
☆收藏
答案解析:无
☆收藏
上一篇:选项中哪一行代码可以替换题目中//add code here而不产生编译错误?()public abstract class MyClass { public int constInt = 5; //add code here public void method(){ }}
下一篇:System.out.println("5" + 2);的输出结果应该是()。
- 我要回答: 网友(216.73.216.96)
- 热门题目: 1.下面哪一条不属于党员廉洁自律 2.勇于自我革命、()是我们党最 3.我们的道路自信、理论自信、制
