public String nextToken(){
  if (currentPosition >= maxPosition) {
    throw new NoSuchElementException();
  }
  int start=currentPosition;
  while ((currentPosition < maxPosition) && Character.isLetterOrDigit(str.charAt(currentPosition))) {
    currentPosition++;
  }
  if ((start == currentPosition) && (!Character.isLetterOrDigit(str.charAt(currentPosition)))) {
    currentPosition++;
  }
  return str.substring(start,currentPosition);
}

public String nextToken ( ) { if ( currentPosition >= maxPosition ) { throw new NoSuchElementException ( ) ; } int start = currentPosition ; while ( ( currentPosition < maxPosition ) && Character . isLetterOrDigit ( str . charAt ( currentPosition ) ) ) { currentPosition ++ ; } if ( ( start == currentPosition ) && ( ! Character . isLetterOrDigit ( str . charAt ( currentPosition ) ) ) ) { currentPosition ++ ; } return str . substring ( start , currentPosition ) ; }
returns the next token from this string tokenizer .
