Here you can find the source of joinLists(List
public static <T> List<T> joinLists(List<T>... list)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> joinLists(List<T>... list) { List<T> result = new ArrayList<T>(); for (List<T> list2 : list) { result.addAll(list2);/* ww w .j a va 2 s .c o m*/ } return result; } }