Here you can find the source of subarray(int[] array, int offset, int length)
public static int[] subarray(int[] array, int offset, int length)
//package com.java2s; //License from project: Open Source License public class Main { public static int[] subarray(int[] array, int offset, int length) { if (offset > array.length - 1 || offset + length > array.length) return new int[] {}; int select[] = new int[length]; for (int i = 0; i < length; i++) select[i] = array[offset + i]; return select; }/* w ww .j av a2 s . c o m*/ }