转载:https://blog.csdn.net/u013066244/article/details/53197756 用JAVA自带的函数 public static boolean isNumericZidai(String str) { for (int i = 0; i < str.length(); i++) { System.out.println(str.charAt(i)); if (!Character.isDigit(str.charAt(i))) { return fal…