Here you can find the source of getSublist(List
private static <T> List<T> getSublist(List<T> list, int i)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { private static <T> List<T> getSublist(List<T> list, int i) { List<T> sublist = new ArrayList<T>(); for (int j = i; j < list.size(); j++) { sublist.add(list.get(j));/*w ww .j a v a 2s .co m*/ } return sublist; } }