03 2014 档案

摘要: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 阅读(642) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示