Here you can find the source of concat(T[]... tss)
public static <T> T[] concat(T[]... tss)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <T> T[] concat(T[]... tss) { int length = 0; for (T[] ts : tss) length += ts.length;/* w w w . j a v a 2 s. co m*/ T[] res = Arrays.copyOf(tss[0], length); for (int i = 1, p = tss[0].length; i < tss.length; p += tss[i++].length) { System.arraycopy(tss[i], 0, res, p, tss[i].length); } return res; } }