Here you can find the source of mergeArrays(T[] lhs, T[] rhs)
public static <T> T[] mergeArrays(T[] lhs, T[] rhs)
//package com.java2s; //License from project: Open Source License import java.util.Arrays; public class Main { public static <T> T[] mergeArrays(T[] lhs, T[] rhs) { T[] newArray = Arrays.copyOf(lhs, lhs.length + rhs.length); for (int i = lhs.length; i < rhs.length; ++i) { newArray[i] = rhs[i - lhs.length]; }//from w w w . j a v a 2 s.com return newArray; } }