int[]数组不是基本类型,是对象,所以默认为null java里面所有对象没有new得时候,都为null,基本类型int才是默认为0
int []a; //这是声明一个数组,此时为null int []a = new int[10]; //这是new了一个有10个元素的数组a,此时默认值为0