ListbeforeList= new ArrayList<>(); for (int i = 0; i < 100 ; i++) { beforeList.add(i); } //假如有一个list,元素个数100 int current=1; //页码 int pageSize=10; //每页显示的数量 int totalCount=beforeList.size(); int pageCount = (totalCount / pageSize) + ((totalCount % current > 0) ? 1 : 0); int start=(current-1) * pageSize; int end = current==pageCount ? totalCount : current * pageSize; List updateList=beforeList.subList(start,end); System.out.println(updateList);