Here you can find the source of toInt(String str)
private static int toInt(String str)
//package com.java2s; //License from project: Apache License public class Main { private static int toInt(String str) { if (str == null) { return 0; } else {/*from w ww.ja v a 2 s .co m*/ try { return Integer.parseInt(str); } catch (NumberFormatException var3) { return 0; } } } }