首页 试题广场 > 试题详情
单选题

在Java中,如下代码段的输出结果为()。
public class Test {
int i = 10;
public void methodOne(int i){
System.out.println(i);
}
public void methodTwo(){
int i = 12;
System.out.println(i);
i++;
}
public void methodThree(){
System.out.println(i);
}
public static void main(String args[]){
Test test = new Test();
test.methodOne(11);
test.methodTwo();
test.methodThree();
}
}

  • A.10
    11
    12
  • B.11
    12
    10
  • C.不能正常运行,编译时出错
  • D.以上都不正确
提交并查看答案
下一题 上一题
Ke星伙伴们的回答/ 52个回答
关闭
关闭
QQ
交流群
邀请
好友
App
下载
意见
反馈
返回
顶部