单选题:What will happen if you try to compile and run the following cod
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
```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