java 一维数组声明一维数组方式:int [] a=new int[3];int [] a=new int[]{1,2,3};int [] a={1,2,3};左边[]中不允许有数字,右边有{...} 那么右边[]内不能有数字。左边[]和数组名可交换顺序。数组的本质是类。