Here you can find the source of getIntValue(String strVal, int defVal)
public static int getIntValue(String strVal, int defVal)
//package com.java2s; //License from project: Apache License import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class Main { private static Logger log = LoggerFactory.getLogger("PersistenceUtil"); public static int getIntValue(String strVal, int defVal) { try {//from ww w. j a v a 2 s . c om return Integer.parseInt(strVal); } catch (Exception exp) { log.error("Invalid int value : " + strVal); } return defVal; } }