/**
  *
判断字符串是不是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;
 }

 

相关文章: