Here you can find the source of concat(T[] first, T[] second)
public static <T> T[] concat(T[] first, T[] second)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static <T> T[] concat(T[] first, T[] second) { T[] result = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, result, first.length, second.length); return result; }/*from ww w. ja va 2s . c o m*/ public static float[] concat(float[] first, float[] second) { float[] result = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, result, first.length, second.length); return result; } public static int[] concat(int[] first, int[] second) { int[] result = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, result, first.length, second.length); return result; } }