Here you can find the source of getSubList(List source, int nFrom, int nTo)
public static List getSubList(List source, int nFrom, int nTo)
//package com.java2s; import java.util.*; public class Main { public static List getSubList(List source, int nFrom, int nTo) // INCLUSIVE {/*ww w . j ava2 s .c om*/ if (nFrom < 0) // $$$$ HACK nFrom = 0; List list = new ArrayList(); for (int i = nFrom; i < (nTo + 1); ++i) { list.add(source.get(i)); } return list; } }