int total = list.size(); int start = Math.min((pageNum - 1) * pageSize, total); int end = Math.min(pageNum * pageSize, total); List<Object> datas = list.subList(start, end);
list to page 代码片段
原文:https://www.cnblogs.com/bwlx/p/14713463.html