13031是数组的大小,10看做线程数,目的是将13031大小的数组放到10个线程中执行
public static void main(String[] args) {
int every = 13031 / 10;
for (int i = 0; i <= 9; i++) {
if (i == 0 && i != 9) {
System.out.println("start=" + i + ";end=" + every);
} else if (i == 9) {
System.out.println("start=" + (i * every+1) + ";end=" + (equipmentList.size() - 1));
} else {
System.out.println("start=" + (i * every+1) + ";end=" + (i * every + every));
}
}
}