• 2022-06-09
    关于下面的代码,________是对的。public class Test2{int arr[]=new int[10];public static void main(String args[]){Systme.out.println(arr[1]);}}
    A: 编译出错
    B: 编译正确,运行出错
    C: 输出0
    D: 输出null
  • A

    内容

    • 0

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

    • 1

      阅读下列代码: public class Person{ static int arr[]=new int[10]; public static void main(String args){ System.out.println(arr [9]); } } 该代码的运行结果是______。 A: 编译时将产生错误 B: 编译时正确,运行时将产生错误 C: 输出零 D: 输出空

    • 2

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

    • 3

      关于下面代码的说法()是正确的?public class Example{public static void main(String[] args){int[] arr= new int[10];System.out.println(arr[1]);}} A: 编译时产生错误 B: 编译时正确,运行时将产生错误 C: 输出零 D: 输出空(null)

    • 4

      智慧职教: 下面程序的运行结果是(     ) public class Person{ int[] arr=new int[10]; public static void main(String[]  args){ System.out .println(arr[9]); } }