Java tutorial
//package com.java2s; /* * Copyright 2011-2016 ZXC.com All right reserved. This software is the confidential and proprietary information of * ZXC.com ("Confidential Information"). You shall not disclose such Confidential Information and shall use it only in * accordance with the terms of the license agreement you entered into with ZXC.com. */ import java.util.ArrayList; import java.util.List; public class Main { public static <T> List<T> joinList(List<T>... lists) { List<T> list = new ArrayList<T>(); if (lists != null) { for (List<T> l : lists) { list.addAll(l); } } return list; } }