Here you can find the source of subArray(Object in[], int start, int end)
Parameter | Description |
---|---|
in | a parameter |
start | a parameter |
end | a parameter |
public static Object[] subArray(Object in[], int start, int end)
//package com.java2s; //License from project: Open Source License public class Main { /**/* w w w . j a v a 2s . co m*/ * Return a subset of an array. * * @param in * @param start * @param end * @return */ public static Object[] subArray(Object in[], int start, int end) { Object[] ret = new Object[end - start + 1]; int j = 0; for (int i = start; i <= end; i++) { ret[j++] = in[i]; } return ret; } }