list is the original total collection, newlist is the collection after obtaining a specific area, pageindex indicates the selected specific page number data, ten entries per page
if(pageIndex*10>list.size()){
newlist=list.subList((pageIndex-1)*10, list.size());}else{
newlist=list.subList((pageIndex-1)*10, pageIndex*10);
}
Note that although newList is a new collection, the data in newList is modified, and the data in list also changes.