public boolean isLetterOrDigitAhead(){
  int pos=currentPosition;
  while (pos < maxPosition) {
    if (Character.isLetterOrDigit(str.charAt(pos)))     return true;
    pos++;
  }
  return false;
}

public boolean isLetterOrDigitAhead ( ) { int pos = currentPosition ; while ( pos < maxPosition ) { if ( Character . isLetterOrDigit ( str . charAt ( pos ) ) ) return true ; pos ++ ; } return false ; }
tells if there is a digit or a letter character ahead .
