首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

判断字符串是不是数字

2012-12-20 
判断字符串是否数字private static boolean isNumeric(String str){Pattern pattern Pattern.compile([

判断字符串是否数字

private static boolean isNumeric(String str){Pattern pattern = Pattern.compile("[0-9]*");Matcher isNum = pattern.matcher(str);if( !isNum.matches() ){return false;}return true;}

热点排行