判断字符串是不是数字

判断字符串是否数字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;}