多做题,通过考试没问题!

Java认证考试

睦霖题库>其他计算机考试>Java认证考试

public class Test {  public int aMethod() {  static int i = 0;  i++;  return i;  }  public static void main (String args[]) {  Test test = new Test();  test.aMethod();  int j = test.aMethod();  System.out.println(j);  }  }  What is the result?()  

  • A、 0
  • B、 1
  • C、 2
  • D、 Compilation fails.
正确答案:D
答案解析:
进入题库查看解析

微信扫一扫手机做题