Java Integer Create toInt(String str, int val)

Here you can find the source of toInt(String str, int val)

Description

to Int

License

Open Source License

Declaration

public static int toInt(String str, int val) 

Method Source Code

//package com.java2s;
// it under the terms of the GNU General Public License as published by

public class Main {
    public static int toInt(String str) {
        return Integer.parseInt(str);
    }/*from  w  w w  . j a  v  a  2s. c  o m*/

    public static int toInt(String str, int val) {
        return str != null ? Integer.parseInt(str) : val;
    }
}

Related

  1. toInt(String str)
  2. toInt(String str)
  3. toInt(String str, int defaultValue)
  4. toInt(String str, int defaultValue)
  5. toInt(String str, int defValue)
  6. toInt(String string)
  7. toInt(String string)
  8. ToInt(String string)
  9. toInt(String string)