/**
  *
判断字符串是不是Integer
  *
  * @param str
  * @return true OR false
  * @see isNumeric("abc") = false
  * @see isNumeric("123") = true
  */
 public static boolean isInteger(String str) { 
  boolean result = true;
  try {
   Integer.parseInt(str); 
  } catch (Exception e) {  
   result = false;
  }
  return result;
 }

 

相关文章:

  • 2021-10-02
  • 2021-12-10
  • 2021-12-11
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-03-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-06-06
  • 2022-01-12
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案