Java tutorial
//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) { if (first == null || second == null) return null; T[] result = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, result, first.length, second.length); return result; } }