public String nextToken(){
  currentPosition=(newPosition >= 0 && !delimsChanged) ? newPosition : skipDelimiters(currentPosition);
  delimsChanged=false;
  newPosition=-1;
  if (currentPosition >= maxPosition)   throw new NoSuchElementException();
  int start=currentPosition;
  currentPosition=scanToken(currentPosition);
  return str.substring(start,currentPosition);
}

public String nextToken ( ) { currentPosition = ( newPosition >= 0 && ! delimsChanged ) ? newPosition : skipDelimiters ( currentPosition ) ; delimsChanged = false ; newPosition = - 1 ; if ( currentPosition >= maxPosition ) throw new NoSuchElementException ( ) ; int start = currentPosition ; currentPosition = scanToken ( currentPosition ) ; return str . substring ( start , currentPosition ) ; }
returns the next token from this string tokenizer .
