import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

 

 

/**
* @param str 校验字符串
* @return 如果可以转换成整型 为true 如果不能转换成整型 为
*/
public static boolean isNumeric(String str) {
Pattern pattern = Pattern.compile("[0-9]*");
Matcher isNum = pattern.matcher(str);
if (!isNum.matches()) {
return false;
}
return true;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
  • 2021-12-16
  • 2021-05-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
  • 2022-12-23
  • 2021-08-07
  • 2022-12-23
相关资源
相似解决方案