当前位置:百科知识 > 知到客户系统答案

问题描述:

[单选] 下面的方法,当输入为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
参考答案:查看
答案解析:
☆收藏

随机题目