Here you can find the source of joinArrays(T[] a, T[] b)
public static <T> T[] joinArrays(T[] a, T[] b)
//package com.java2s; //License from project: Apache License import java.util.Arrays; public class Main { public static <T> T[] joinArrays(T[] a, T[] b) { T[] res = Arrays.copyOf(a, a.length + b.length); System.arraycopy(b, 0, res, a.length, b.length); return res; }/*from w ww .j a v a 2 s. c o m*/ }