推断数据是否为整数
public class IsInteger {
private IsInteger(){};
public static boolean isInteger(String value) {
try {
Integer.parseInt(value);
return true;
} catch (NumberFormatException e) {
return false;
}
}
}
浙公网安备 33010602011771号