@Override public synchronized Object[] toArray(){
  Object[] result=new Object[elementCount];
  System.arraycopy(elementData,0,result,0,elementCount);
  return result;
}

@ Override public synchronized Object [ ] toArray ( ) { Object [ ] result = new Object [ elementCount ] ; System . arraycopy ( elementData , 0 , result , 0 , elementCount ) ; return result ; }
returns a new array containing all elements contained in this vector .
