1、判断a string是否是数字
public boolean isNumeric(String checkStr) {
try {
Integer.parseInt(checkStr);
return true; // Did not throw, must be a number
} catch (NumberFormatException err) {
return false; // Threw, So is not a number
}
}
2、判断char是否是数字
Character.isDigit(char)