Here you can find the source of concat(T[] array1, T[] array2)
public static <T> T[] concat(T[] array1, T[] array2)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static <T> T[] concat(T[] array1, T[] array2) { T[] newarray = Arrays.copyOf(array1, array1.length + array2.length); for (int i = 0; i < array2.length; i++) { newarray[array1.length + i] = array2[i]; }//from w w w . j a va 2 s .c o m return newarray; } }