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

单选题:Given code below, which statement is correct?

Luz5年前 (2021-05-10)题库1356
Given code below, which statement is correct? @[C](2)
```Java
public class Person{
static int arr[] = new int[5];
public static void main(String a[]) {
System.out.println(arr[0]);
}}
```

A. Compile error.
B. Compiles but run-time error
C. Prints 0
D. Prints nothing




A.Compile error.
B.Compiles but run-time error
C.Prints 0
D.Prints nothing


答案:C