Parse string to Integer - Android java.lang

Android examples for java.lang:Integer

Description

Parse string to Integer

Demo Code


public class Main{

    public static boolean isInteger(String input) {
        try {/*w  ww.  j  a  v a 2 s . com*/
            Integer.parseInt(input);
            return true;
        } catch (Exception e) {
            return false;
        }
    }

}

Related Tutorials