Here you can find the source of subArray(T[] array, int start, int end)
public static <T> T[] subArray(T[] array, int start, int end)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; import java.util.List; public class Main { public static <T> T[] subArray(T[] array, int start, int end) { List<T> list = Arrays.asList(array); return list.subList(start, end).toArray(array); }//from ww w . j a va2 s . c o m }