static <T> T[] copy(Object[] source, int from, int to, T[] arrayOfType) {
    T[] result = newArray(arrayOfType, to - from);
    System.arraycopy(source, from, result, 0, to - from);
    return result;
  }
static <T> T[] copy(Object[] source, int from, int to, T[] arrayOfType) {
    T[] result = newArray(arrayOfType, to - from);
    System.arraycopy(source, from, result, 0, to - from);
    return result;
  }
static < T > T [ ] copy ( Object [ ] source , int from , int to , T [ ] arrayOfType ) { T [ ] result = newArray ( arrayOfType , to - from ) ; System . arraycopy ( source , from , result , 0 , to - from ) ; return result ; }
Equivalent to Arrays.copyOfRange(source, from, to, arrayOfType.getClass()).
Equivalent to Arrays . copyOfRange ( source from to arrayOfType . getClass () ) .