Here you can find the source of concat(T[] first, T[] second)
Parameter | Description |
---|---|
first | array |
second | array |
public static <T> T[] concat(T[] first, T[] second)
//package com.java2s; // Licensed under the Apache License, Version 2.0 (the "License"); import java.util.Arrays; public class Main { /**//from www . ja v a 2 s .c om * Concats two arrays in to one * * @param first * array * @param second * array * * @return unified array */ public static <T> T[] concat(T[] first, T[] second) { T[] result = Arrays.copyOf(first, first.length + second.length); System.arraycopy(second, 0, result, first.length, second.length); return result; } }