Here you can find the source of convertStringToInt(String str)
public static int convertStringToInt(String str)
//package com.java2s; //License from project: Open Source License public class Main { public static int convertStringToInt(String str) { int val = 0; try {/*w ww . j a v a2 s. c o m*/ val = Integer.parseInt(str); } catch (Exception e) { e.getMessage(); } return val; } }