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

已知如下代码:public class Test{long a[]=newlong[10]:public static void main(String arg[]){


已知如下代码: public class Test { long a[]=newlong[10]: public static void main(String arg[]){ System.out.println(a[6]): } } 请问哪个语句是正确的()。

A.输出为null

B.输出为0

C.编译时出错

D.运行时出错

请帮忙给出正确答案和分析,谢谢!

参考答案
您可能感兴趣的试题
  • 下列代码的执行结果是()。 public class Test{ public int aMethod( ){ static int i=0; i++;

  • 阅读下列代码public class Test implements Runnable{public void run(Thread t){System. out. p

  • 下列代码中 将引起一个编译错误的行是()。1)public class Test{2)int m n;3)public Test(){}4)pub

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

  • 下列代码中 将引起一个编译错误的行是1)public class Test{2) int m n;3)public Test(){}4)publi

  • 下列代码中 将引起一个编译错误的行是( )。 1)public class Test{ 2)int m n; 3)public Test