Android String to Double Convert getDoubleFromStr(String str)

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

Description

get Double From Str

Declaration

public static Double getDoubleFromStr(String str) 

Method Source Code

//package com.java2s;

public class Main {

    public static Double getDoubleFromStr(String str) {
        Double i = 0.0;// w  w w  .  java 2  s  .c  om
        try {
            i = Double.valueOf(str);
        } catch (Exception e) {
        }
        return i;
    }
}

Related

  1. transformToDigit(String numString)
  2. getDouble(String str, double defaultValue)
  3. getDoubleValue(String value)
  4. parseDistance(double distance)
  5. parseDouble(String string, double defValue)
  6. toDouble(String s)