Here you can find the source of split(List
public static <T> List<List<T>> split(List<T> from, int subListSize)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { /**// w w w . j a va 2 s . com * Partition from into subLists, each of size subListSize. */ public static <T> List<List<T>> split(List<T> from, int subListSize) { List<List<T>> into = new ArrayList<List<T>>(); for (int first = 0; first < from.size(); first += subListSize) { into.add(from.subList(first, Math.min(first + subListSize, from.size()))); } return into; } }