太明显了,你创建list应该这样写
List<Integer> ints= new ArrayList<Integer>(Arrays.asList(new Integer[]{1,2,3,4,5}));
如果你不用 new ArrayList(),你就会发现无法添加元素,但可以展示