Here you can find the source of concat(final List
public static <E> List<E> concat(final List<E> list1, final List<E> list2)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static <E> List<E> concat(final List<E> list1, final List<E> list2) { if (list1 == null || list2 == null) throw new NullPointerException("Not initizalized lists"); List<E> concat = new ArrayList<E>(list1.size() + list2.size()); concat.addAll(list1);/*from w w w .j av a 2 s. co m*/ concat.addAll(list2); return concat; } }