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