Here you can find the source of getClonedSublistOf(List
public static List<String> getClonedSublistOf(List<String> list, int startIndexInclusive, int endIndexExclusive)
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.List; public class Main { public static List<String> getClonedSublistOf(List<String> list, int startIndexInclusive, int endIndexExclusive) { List<String> subList = new ArrayList<String>(); for (int i = startIndexInclusive; i < endIndexExclusive; ++i) subList.add(list.get(i));/*w w w. j a va 2s . c o m*/ return subList; } }