public static void fenye(List list,int pageNo, int pagesize){
List<Integer> subList= list.subList((pageNo-1)*pagesize,pagesize*(pageNo));
System.out.println(subList);
}
public static void main(String[] args) {
List<Integer> list=new ArrayList<Integer>();
for(int i=1;i<100;i++){
list.add(i);
}
fenye(list,2,10);
}
结果: [11, 12, 13, 14, 15, 16, 17, 18, 19, 20]