public Object[] toArray(){
  return list.toArray();
}

public Object [ ] toArray ( ) { return list . toArray ( ) ; }
return an array of all elements in the stack . the oldest element is the first element of the returned array .
