当前位置: 答题翼 > 问答 > 计算机类考试 > 正文
目录: 标题| 题干| 答案| 搜索| 相关
问题

阅读下列代码后public class Person{int arr[]=new int[10];public static void main(String arg


阅读下列代码后 public class Person{ int arr[]=new int[10]; public static void main(String args[]){ System.out.println(arr[1]); } } 正确的说法是()。

A.编译时将产生错误

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

C.输出零

D.输出空

参考答案
您可能感兴趣的试题
  • 给出下面的代码: public class Person{ static int arr[] =n

  • 下列代码的执行结果是()。 public class Test{ public int aMethod( ){ static int i=0; i++;

  • 给出下面的代码: class Person{ String name department ; public void printValue(){ System.out.prin

  • 阅读下列代码: public class Person{ static int arr[]=new int[10]; public static void main

  • 已知 import java.io.*; class Person{ public static void print();} } 对于以上代码 其输出结果是

  • 给出下面代码: public class Person{ static int arr[] = new int[10];public static void