Java tutorial
//package com.java2s; import java.util.*; public class Main { @SuppressWarnings("unchecked") public static <T> List<T> merge(Collection<T> c1, Collection<T> c2) { List list = new ArrayList(c1.size() + c2.size()); list.addAll(c1); list.addAll(c2); return list; } }