Java Integer Create toInt(String str)

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

Description

to Int

License

Apache License

Declaration

private static int toInt(String str) 

Method Source Code

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

public class Main {
    private static int toInt(String str) {
        if (str == null) {
            return 0;
        } else {/*from   w ww.ja  v a 2  s  .co m*/
            try {
                return Integer.parseInt(str);
            } catch (NumberFormatException var3) {
                return 0;
            }
        }
    }
}

Related

  1. toInt(String s, int exception)
  2. toInt(String sInt)
  3. toInt(String str)
  4. toInt(String str)
  5. toInt(String str)
  6. toInt(String str)
  7. toInt(String str)
  8. toInt(String str)
  9. toInt(String str)