Here you can find the source of subArray(Object a[], int from)
public static Object[] subArray(Object a[], int from)
//package com.java2s; //License from project: Apache License public class Main { public static Object[] subArray(Object a[], int from) { if (from == 0) return a; Object newa[] = new Object[a.length - from]; System.arraycopy(a, from, newa, 0, newa.length); return newa; }/*from www. j a va2s.co m*/ public static Object[] subArray(Object a[], int from, int to) { if (from == 0 && to == a.length) return a; Object newa[] = new Object[to - from]; System.arraycopy(a, from, newa, 0, newa.length); return newa; } public static int[] subArray(int a[], int from) { if (from == 0) return a; int newa[] = new int[a.length - from]; System.arraycopy(a, from, newa, 0, newa.length); return newa; } }