判断字符串是否是数字

/**
* 判断字符串是否是数字
* @param s
* @return
*/
public final static boolean isNumeric(String s) {
  if (s != null && !"".equals(s.trim()))
    return s.matches("^[0-9]*$");
  else
    return false;
}

原文地址:https://www.cnblogs.com/baimj/p/14096097.html