package com.loveCoding.j20250517_java_array;

/**
 * @author WanJl
 * @version 1.0
 * @title Demo04
 * @description 空指针异常 数组下标越界异常
 * @create 2025/5/17
 */
public class Demo04 {
    public static void main(String[] args) {
        int[] arr=null;
        System.out.println(arr[3]); //空指针异常
        int[] arr1=new int[2];
        System.out.println(arr1[3]);    //数组下标越界异常
    }
}
