判断是否为数字

protected boolean isNumeric(String str) {
Pattern pattern = Pattern.compile("[0-9]*");
return pattern.matcher(str).matches();
}

posted on 2014-05-06 14:43  clarenceV1  阅读(119)  评论(0编辑  收藏  举报

导航