Here you can find the source of concat(List
@SafeVarargs public static <T> List<T> concat(List<T> list, T... items)
//package com.java2s; //License from project: LGPL import java.util.ArrayList; import java.util.List; public class Main { @SafeVarargs public static <T> List<T> concat(List<T> list, T... items) { List<T> ret = new ArrayList<>(list); for (T item : items) { ret.add(item);/* www . j a v a 2 s.c om*/ } return ret; } public static <T> List<T> concat(List<T> list, List<T> list2) { List<T> ret = new ArrayList<>(list); ret.addAll(list2); return ret; } }