-->
当前位置:首页 > 题库

单选题:What will happen if you try to compile and run the following cod

Luz5年前 (2021-05-10)题库615
What will happen if you try to compile and run the following code? @[D](2)
```Java
public class Test {
public static void main(String argv[]){
Integer anar[]=new Integer[5];
new Integer(5);
System.out.println(anar[0]);
}
}
```


A. Error: anar is referenced before it is initialized
B. null
C. 0
D. 5




A.Error: anar is referenced before it is initialized
B.null
C.0
D.5


答案:D