Here you can find the source of addAll(List
@SuppressWarnings("unchecked") public static <T> boolean addAll(List<T> list, T... array)
//package com.java2s; import java.util.List; public class Main { @SuppressWarnings("unchecked") public static <T> boolean addAll(List<T> list, T... array) { return addElements(list, array); }/*www .ja va 2s . c om*/ public static <T> boolean addElements(List<T> list, T[] array) { boolean good = true; for (T obj : array) { good &= list.add(obj); } return good; } }