Android examples for java.lang:Double
Convert string to Double
import java.text.DecimalFormat; import java.util.ArrayList; import java.util.List; import java.util.Set; import java.util.TreeSet; import java.util.regex.Matcher; import java.util.regex.Pattern; public class Main{ public static double getDouble(String text) { try {/*from w w w .jav a 2 s . c o m*/ return Double.valueOf(text); } catch (Exception e) { } return 0; } }