Here you can find the source of arrayappend(T[] array, T[] append)
public static <T> T[] arrayappend(T[] array, T[] append)
//package com.java2s; import java.lang.reflect.Array; public class Main { public static <T> T[] arrayappend(T[] array, T[] append) { return arrayappend(array, append, append.length); }//from www.j av a 2 s . c o m public static <T> T[] arrayappend(T[] array, T[] append, int size) { array = arrayexpend(array, size); System.arraycopy(append, 0, array, array.length - size, size); return array; } @SuppressWarnings("unchecked") public static <T> T[] arrayexpend(T[] array, int increment) { System.arraycopy( array, 0, array = (T[]) Array.newInstance(array.getClass() .getComponentType(), array.length + increment), 0, array.length - increment); return array; } }