Here you can find the source of arrayConcat(T[] a, T[] b)
public static <T> T[] arrayConcat(T[] a, T[] b)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static <T> T[] arrayConcat(T[] a, T[] b) { if (a == null) throw new IllegalArgumentException("'a' can't be null"); if (b == null) throw new IllegalArgumentException("'b' can't be null"); T[] rn = Arrays.copyOf(a, a.length + b.length); System.arraycopy(b, 0, rn, a.length, b.length); T[] r = rn;/*from w w w . ja va 2 s. c o m*/ return r; } }