java判断字符串是否全为数字
String str = "032";
boolean isNum = str.matches("[0-9]+");
java判断字符串是否全为英文字母
String str="dhdhdhdj";
boolean isWord=str.matches("[a-zA-Z]+");
java判断字符串是否全为数字
String str = "032";
boolean isNum = str.matches("[0-9]+");
java判断字符串是否全为英文字母
String str="dhdhdhdj";
boolean isWord=str.matches("[a-zA-Z]+");
转载于:https://www.cnblogs.com/ggqzz/p/8421716.html