public static void Main (string[] args) {
List<integer> dataList = new arraylist<integer> ();
for (int i=0;i<12888;i++)
Datalist.add (i);
//Batching
if (null!=datalist&&datalist.size () >0) {
int pointsdatalimit = 1000;//Limit number of bars
Intege R size = Datalist.size ();
//Determine if it is necessary to batch
if (pointsdatalimit<size) {
int part = size/pointsdatalimit;//number of batches
System.ou T.println ("Total:" +size+ "bar,! "+" divided into: "+part+" Batch ");
//
for (int i = 0; i < part; i++) {
//1000
list<integer> listpage = Dat Alist.sublist (0, Pointsdatalimit);
System.out.println (listpage);
//Culling
datalist.sublist (0, Pointsdatalimit). Clear ();
if (!datalist.isempty ()) {
System.out.println (dataList);//Represents the last remaining data
}
}else{
System.out.println (dataList);
}
}else{
System.out.println ("No data!!!");
}
}
Java List (split) batching