报错: Exception in thread “main” java.lang.IndexOutOfBoundsException: Index: 300, Size: 5 原因:list.remove(300); 没有下标为300的元素,数组下标越界 解决方案 可以根据下标删除元素,如list.remove(1) 如果想删除指定元素,需传对象 System.out.println(list.remove(Integer.valueOf(300)));