public boolean addAll(Collection c){
  int numNew=c.size();
  if (numNew == 0)   return false;
synchronized (this) {
    Object[] elements=getArray();
    int len=elements.length;
    Object[] newElements=new Object[len + numNew];
    System.arraycopy(elements,0,newElements,0,len);
    for (Iterator itr=c.iterator(); itr.hasNext(); ) {
      Object e=itr.next();
      newElements[len++]=e;
    }
    setArray(newElements);
    return true;
  }
}

public boolean addAll ( Collection c ) { int numNew = c . size ( ) ; if ( numNew == 0 ) return false ; synchronized ( this ) { Object [ ] elements = getArray ( ) ; int len = elements . length ; Object [ ] newElements = new Object [ len + numNew ] ; System . arraycopy ( elements , 0 , newElements , 0 , len ) ; for ( Iterator itr = c . iterator ( ) ; itr . hasNext ( ) ; ) { Object e = itr . next ( ) ; newElements [ len ++ ] = e ; } setArray ( newElements ) ; return true ; } }
appends all of the elements in the specified collection to the end of this list , in the order that they are returned by the specified collection ' s iterator .
