试题详情
单项选择题 public class X {   public static void main (Stringargs) {   int a = new int [1]   modify(a);   System.out.printIn(a[0]);   }   public static void modify (int a) {   a[0] ++;    }    }   What is the result?()  

A、 The program runs and prints “0”

B、 The program runs and prints “1”

C、 The program runs but aborts with an exception.

D、 An error “possible undefined variable” at line 4 causes compilation to fail.

E、 An error “possible undefined variable” at line 9 causes compilation to fail.

  • B
  • 关注下方微信公众号,在线模考后查看

热门试题