Here you can find the source of toInt(String value, int _default)
public static int toInt(String value, int _default)
//package com.java2s; //License from project: Apache License public class Main { public static int toInt(String value, int _default) { if (value == null || value.length() == 0) return _default; return Integer.valueOf(value); }//ww w .j av a 2s . co m }