📅  最后修改于: 2022-03-11 14:52:06.946000             🧑  作者: Mango
public static boolean isNumeric(String strNum) {
if (strNum == null) {
return false;
}
try {
double d = Double.parseDouble(strNum);
} catch (NumberFormatException nfe) {
return false;
}
return true;
}