📜  java try catch integer.parseint - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:42.111000             🧑  作者: Mango

代码示例1
public static Integer tryParse(String text) {
  try {
    return Integer.parseInt(text);
  } catch (NumberFormatException e) {
    return null;
  }
}