Java Integer Create toInteger(String str)

Here you can find the source of toInteger(String str)

Description

to Integer

License

Apache License

Declaration

public static int toInteger(String str) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static int toInteger(String str) {
        return toInteger(str, Integer.MIN_VALUE);
    }/*from  w  w w .ja  v a2  s.c  om*/

    public static int toInteger(String str, int defaults) {
        int result = defaults;
        try {
            result = Integer.parseInt(str);
        } catch (Exception e) {
        }

        return result;
    }
}

Related

  1. ToInteger(String s)
  2. toInteger(String s)
  3. toInteger(String s)
  4. toInteger(String s, int defValue)
  5. toInteger(String str)
  6. toInteger(String str)
  7. toInteger(String string)
  8. toInteger(String string, Integer deff)
  9. toInteger(String val)