Java Double Number Create toDouble(String input, double defaultValue)

Here you can find the source of toDouble(String input, double defaultValue)

Description

to Double

License

Apache License

Declaration

public static double toDouble(String input, double defaultValue) 

Method Source Code

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

public class Main {
    public static double toDouble(String input, double defaultValue) {
        try {/*from w  w w.java  2  s  .c  o  m*/
            return Double.parseDouble(input);
        } catch (Exception e) {
            return defaultValue;
        }
    }
}

Related

  1. toDouble(Object x)
  2. toDouble(short[] arr)
  3. toDouble(short[] src)
  4. toDouble(String aString)
  5. toDouble(String doubleString, Double defaultValue)
  6. toDouble(String parameter)
  7. toDouble(String s)
  8. toDouble(String s)
  9. toDouble(String s)