Here you can find the source of add(List
public static ArrayList<String> add(List<String> a, List<String> b)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { public static ArrayList<String> add(List<String> a, List<String> b) { ArrayList<String> ret = new ArrayList<String>(); for (String s : a) { ret.add(s);// w w w . ja va 2 s . com } for (String s : b) { ret.add(s); } return ret; } }