📅  最后修改于: 2022-03-11 14:52:43.933000             🧑  作者: Mango
代码示例1
try {
int i = Integer.parseInt(s);
// s is a valid integer
}
catch (NumberFormatException e) {
// s is not a valid integer
}