单选题: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?@[C](2)
```Java
public class Q {
public static void main(String argv[]){
int anar[]=new int[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
答案:C
```Java
public class Q {
public static void main(String argv[]){
int anar[]=new int[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
答案:C