Here you can find the source of addAll(final T[] source, final Collection
public static <T> int addAll(final T[] source, final Collection<T> destination)
//package com.java2s; import java.util.Collection; public class Main { public static <T> int addAll(final T[] source, final Collection<T> destination) { int count = 0; for (final T sourceItem : source) { destination.add(sourceItem); ++count;//from w w w. j a v a2 s . c o m } return count; } }