Here you can find the source of combineLists(List
Parameter | Description |
---|---|
a | the first list |
b | the second list |
public static <E> List<E> combineLists(List<E> a, List<E> b)
//package com.java2s; //License from project: Open Source License import java.util.ArrayList; import java.util.List; public class Main { /**/*from ww w . ja va 2 s . com*/ * Combine lists. * * @param a the first list * @param b the second list * @return the result of combining both lists */ public static <E> List<E> combineLists(List<E> a, List<E> b) { ArrayList<E> result = new ArrayList<E>(); result.addAll(a); result.addAll(b); return result; } }