• 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,程序运行情况不可预料