• 2021-04-14 问题

    设有如下代码class ArrayTest{public static vo...n(x[4]);}}哪个叙述为真?

    设有如下代码class ArrayTest{public static vo...n(x[4]);}}哪个叙述为真?

  • 2022-06-19 问题

    中国大学MOOC: public class ArrayTest{ public static void main ( String args[] ) { String s[] = new String[5]; System.out.println(s[0]); }}哪个叙述为真?

    中国大学MOOC: public class ArrayTest{ public static void main ( String args[] ) { String s[] = new String[5]; System.out.println(s[0]); }}哪个叙述为真?

  • 2022-06-19 问题

    public class ArrayTest{ public static void main ( String args[] ) { String s[] = new String[5]; System.out.println(s[0]); }}哪个叙述为真? A: 运行出错 B: 输出 0 C: 输出 null D: 出现编译错误

    public class ArrayTest{ public static void main ( String args[] ) { String s[] = new String[5]; System.out.println(s[0]); }}哪个叙述为真? A: 运行出错 B: 输出 0 C: 输出 null D: 出现编译错误

  • 2022-06-09 问题

    给出下列代码:public class ArrayTest{static int arr[] = new int[10];public static void main(String args[]) { System.out.println(arr[1]); }}下列哪个结论是正确的?( ) A: 编译时将产生错误 B: 编译时正确,运行时将产生错误 C: 输出零 D: 输出空

    给出下列代码:public class ArrayTest{static int arr[] = new int[10];public static void main(String args[]) { System.out.println(arr[1]); }}下列哪个结论是正确的?( ) A: 编译时将产生错误 B: 编译时正确,运行时将产生错误 C: 输出零 D: 输出空

  • 2022-06-08 问题

    ‌有如下程序代码。public class ArrayTest{ public static void main(String[] args){ int [] a={0,1,2}; a[3]=3; } }‌ A: 程序有错不能通过编译 B: 程序正常运行,为数组下标为3所指的元素赋值3 C: 运行抛出ArrayIndexOutOfBoundsException异常 D: 由于数组允许的最大下标为2,程序运行情况不可预料

    ‌有如下程序代码。public class ArrayTest{ public static void main(String[] args){ int [] a={0,1,2}; a[3]=3; } }‌ A: 程序有错不能通过编译 B: 程序正常运行,为数组下标为3所指的元素赋值3 C: 运行抛出ArrayIndexOutOfBoundsException异常 D: 由于数组允许的最大下标为2,程序运行情况不可预料

  • 1