public void trimToSize(){
  if (count < value.length) {
    char[] newValue=new char[count];
    System.arraycopy(value,0,newValue,0,count);
    value=newValue;
  }
}

public void trimToSize ( ) { if ( count < value . length ) { char [ ] newValue = new char [ count ] ; System . arraycopy ( value , 0 , newValue , 0 , count ) ; value = newValue ; } }
trims off any extra capacity beyond the current length . note , this method is not guaranteed to change the capacity of this object .
