Here you can find the source of concatTwoList(List fromList, List toList)
public static void concatTwoList(List fromList, List toList)
//package com.java2s; //License from project: Apache License import java.util.List; public class Main { public static void concatTwoList(List fromList, List toList) { if (fromList == null || toList == null) return; for (int i = 0; i < fromList.size(); i++) { Object obj = fromList.get(i); if (!toList.contains(obj)) toList.add(obj);/* w w w.j a v a 2 s.co m*/ } } }