Here you can find the source of merge(int[] array1, int[] array2)
public static int[] merge(int[] array1, int[] array2)
//package com.java2s; //License from project: LGPL public class Main { public static int[] merge(int[] array1, int[] array2) { int[] dest = new int[array1.length + array2.length]; System.arraycopy(array1, 0, dest, 0, array1.length); System.arraycopy(array2, 0, dest, array1.length, array2.length); return dest; }//from w w w . j a v a 2s.c om }