📅  最后修改于: 2022-03-11 14:52:27.488000             🧑  作者: Mango
代码示例1
public static boolean isNumeric(String str) {
return str.matches("-?\\d+(\\.\\d+)?"); //match a number with optional '-' and decimal.
}