Here you can find the source of mergeList(List
public static List<String> mergeList(List<String> list1, List<String> list2)
//package com.java2s; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.List; public class Main { public static List<String> mergeList(List<String> list1, List<String> list2) { List<String> list = new ArrayList<String>(Arrays.asList(new String[list1.size()])); Collections.copy(list, list1); list.addAll(list2);/* w ww . j a va2s .co m*/ return list; } }