Here you can find the source of concat(Collection
public static <T> List<T> concat(Collection<T> first, Collection<T> second)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <T> List<T> concat(Collection<T> first, Collection<T> second) { List<T> objs = new ArrayList<>(); objs.addAll(first);//from www. j a v a 2 s .c o m objs.addAll(second); return objs; } }