Java String to Int convertStringToInt(String str)

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

Description

convert String To Int

License

Open Source License

Declaration

public static int convertStringToInt(String str) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static int convertStringToInt(String str) {
        int val = 0;
        try {/*w ww .  j  a  v a2 s. c o m*/
            val = Integer.parseInt(str);
        } catch (Exception e) {
            e.getMessage();
        }

        return val;
    }
}

Related

  1. asInteger(String value)
  2. asInteger(String value)
  3. convertStringToInt(final String str)
  4. convertStringToInt(final String strNumber)
  5. convertStringToInt(String number)
  6. convertStringToInt(String value)
  7. convertStringToInteger(String num)
  8. convertStringToInteger(String s)
  9. convertStringToInteger(String s)