Android examples for java.lang:Math
Parse the string to integer, does not throw exception, return null.
//package com.java2s; public class Main { /**/*from www. jav a2s .c o m*/ * Parse the string to integer, does not throw exception, return null. * <br> * * @param value -{@link String} * @return */ public static Integer parseInteger(String value) { Integer parseValue = null; try { parseValue = Integer.parseInt(value); } catch (Exception e) { //ignored parseValue = null; } return parseValue; } }