Android examples for java.lang:Integer
Convert str to Integer object, return null if str is null.
public class Main{ /**/*from ww w . j a v a2 s . c om*/ * Convert str to Integer object, return null if str is null. * @param str * @return */ public static Integer toInt(String str) { Integer result = null; if (str != null) { result = new Integer(str); } return result; } }