Android String to Int Convert toInt(String obj)

Here you can find the source of toInt(String obj)

Description

to Int

Declaration

public static int toInt(String obj) 

Method Source Code

//package com.java2s;

public class Main {

    public static int toInt(String obj) {

        try {//from w  w w. ja v a 2  s.  co m
            return Integer.parseInt(obj);
        } catch (Exception e) {
        }

        return 0;
    }
}

Related

  1. isNumber(String str)
  2. isNumber(final String s)
  3. isNumberString(String input)
  4. isNumberic(String str)
  5. toInt(Object obj)
  6. toInt(String str, int defValue)
  7. toInt(String str, int defValue)
  8. toInteger(String value)
  9. toNumber(String str)