摘要:
1用JAVA自带的函数public static boolean isNumeric(String str){ for (int i = str.length();--i>=0;){ if (!Character.isDigit(str.charAt(i))){ return false; } } return true; }2用正则表达式public static boolean isNumeric(String str){ Pattern pattern = Pattern.compile("[0-9]*"); return pattern.mat... 阅读全文
posted @ 2014-03-25 18:48
rhino
阅读(648)
评论(0)
推荐(0)

浙公网安备 33010602011771号