单项选择题 (2005年4月二级考试)

阅读下列代码

public class Person{
   int arr[]=new int[10];
   public static void main(String args[]){
      System.out.println(arr[1]);
   }
}

正确的说法是【 】

A、编译时将产生错误

B、编译时正确,运行时将产生错误

C、输出零

D、输出空

参考答案

关键词

int;实例;数组;static;java;new;输出;public;编译;