//正则表达式判断字符串可以是任意的数字
public boolean isNumeric(String str){ Pattern pattern = Pattern.compile("-?[0-9]+\\.?[0-9]+");

Matcher isNum = pattern.matcher(str);
if( !isNum.matches() ){ return false; } return true; }

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-12-19
  • 2022-02-19
  • 2022-12-23
  • 2021-05-22
猜你喜欢
  • 2021-06-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案