code: public static boolean hasDigit(String str)
    {
      final Pattern pattern = Pattern.compile("[0-9]");
      final Matcher matcher = pattern.matcher(str);
      while (matcher.find())
      {
        return true;
      }
      return false;
    }
docs: Returns true if this string contains digits, false otherwise.
  
  @param str
  @return hasDigit Boolean