public static boolean hasDigit(String token){
  int len=token.length();
  for (int i=0; i < len; ++i) {
    char c=token.charAt(i);
    if (Character.isDigit(c)) {
      return true;
    }
  }
  return false;
}

public static boolean hasDigit ( String token ) { int len = token . length ( ) ; for ( int i = 0 ; i < len ; ++ i ) { char c = token . charAt ( i ) ; if ( Character . isDigit ( c ) ) { return true ; } } return false ; }
returns true if the string contains a character in the range [ 0 - 9 ] . false otherwise .
