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