Here you can find the source of getIntFromStr(String str)
public static int getIntFromStr(String str)
//package com.java2s; public class Main { public static int getIntFromStr(String str) { int i = 0; try {// w w w . j a v a2 s .c om i = Integer.valueOf(str); } catch (NumberFormatException e) { } return i; } }