标签:i++ oid stat += sub public static sublist print
public static void main(String[] args) {
List<Integer> list = new ArrayList<>();
for(int i=0;i<70;i++){
list.add(i);
}
int toIndex = 50;
for (int i = 0; i < list.size(); i+=50) {
if (i+50>list.size()) {
toIndex = list.size() - i;
}
List<Integer> newList = list.subList(i, i+toIndex);
System.err.println(newList);
}
}
标签:i++ oid stat += sub public static sublist print
原文地址:https://www.cnblogs.com/worfs/p/10275652.html