Java tutorial
//package com.java2s; //License from project: Apache License import java.util.ArrayList; import java.util.Collection; public class Main { public static <T> ArrayList<T> concat(Collection<T> arr1, Collection<T> arr2) { ArrayList<T> res = new ArrayList<>(arr1); res.addAll(arr2); return res; } }