public String toString(){
  Object[] elements=getArray();
  int maxIndex=elements.length - 1;
  StringBuffer buf=new StringBuffer();
  buf.append("[");
  for (int i=0; i <= maxIndex; i++) {
    buf.append(String.valueOf(elements[i]));
    if (i < maxIndex)     buf.append(", ");
  }
  buf.append("]");
  return buf.toString();
}

public String toString ( ) { Object [ ] elements = getArray ( ) ; int maxIndex = elements . length - 1 ; StringBuffer buf = new StringBuffer ( ) ; buf . append ( "[" ) ; for ( int i = 0 ; i <= maxIndex ; i ++ ) { buf . append ( String . valueOf ( elements [ i ] ) ) ; if ( i < maxIndex ) buf . append ( ", " ) ; } buf . append ( "]" ) ; return buf . toString ( ) ; }
returns a string representation of this list , containing the string representation of each element .
