niusouti.com

给出下列的程序,其叙述正确的是( )。 public class Man{ static int arr [] new int[10]; public static void main (String a []){ System.out.println(arr [1]); } }A.编译时将发生错误B.编译时正确但是运行时出错C.输出为0D.输出为null

题目

给出下列的程序,其叙述正确的是( )。 public class Man{ static int arr [] new int[10]; public static void main (String a []){ System.out.println(arr [1]); } }

A.编译时将发生错误

B.编译时正确但是运行时出错

C.输出为0

D.输出为null


相似考题
更多“给出下列的程序,其叙述正确的是()。 public class Man{ static int arr [] new int[10]; publi ”相关问题
  • 第1题:

    假定一个10行20列的二维整型数组,下列哪个定义语句是正确的()

    A.int[] arr = new int[10,20]

    B.int[] arr = int new[10,20]

    C.int[,] arr = new int[10,20]

    D.int[,] arr = new int[20;10]


    C

  • 第2题:

    假定一个10行20列的二维整型数组,下列哪个定义语句是正确的

    A.int[]arr = new int[10,20]

    B.int[]arr =int new[10,20]

    C.int[,]arr = new int[10,20]

    D.int[,]arr = new int[20,10]


    C

  • 第3题:

    下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)

    A.<class 'int'> <class 'float'> <class 'str'>

    B.<class 'float'> <class 'int'> <class 'str'>

    C.<class 'str'> <class 'float'> <class 'int'>

    D.<class 'str'> <class 'int'> <class 'float'>


    C.循环执行1次

  • 第4题:

    3、假定一个10行20列的二维整型数组,下列哪个定义语句是正确的

    A.int[]arr = new int[10,20]

    B.int[]arr = int new[10,20]

    C.int[,]arr = new int[10,20]

    D.int[,]arr = new int[20;10]


    C

  • 第5题:

    00330038003000301585067361821下列程序段执行结果是___________。 x = 1 print(type(x)) x = 1.0 print(type(x)) x = '1.0' print(type(x)

    A.<class 'int'> <class 'float'> <class 'str'>

    B.<class 'float'> <class 'int'> <class 'str'>

    C.<class 'str'> <class 'float'> <class 'int'>

    D.<class 'str'> <class 'int'> <class 'float'>


    A

  • 第6题:

    【多选题】11.5下列初始化数组的格式正确的是()(多选)

    A.int[ ] arr = new int[ ]{1,2,8,6}

    B.int[ ] arr = {58,5,55,88,99}

    C.int[ ] arr = new int[4]{5,6,8,2}

    D.int[ ] arr = new int[ ]{};


    int[ ] arr = new int[ ]{1,2,8,6};int[ ] arr = {58,5,55,88,99};int[ ] arr = new int[ ]{};