public void append(char digit){
  if (count == digits.length) {
    char[] data=new char[count + 100];
    System.arraycopy(digits,0,data,0,count);
    digits=data;
  }
  digits[count++]=digit;
}

public void append ( char digit ) { if ( count == digits . length ) { char [ ] data = new char [ count + 100 ] ; System . arraycopy ( digits , 0 , data , 0 , count ) ; digits = data ; } digits [ count ++ ] = digit ; }
appends a digit to the list , extending the list when necessary .
