Java tutorial
//package com.java2s; public class Main { public static double getConvertDouble(String str) { double i = 0; try { i = Double.parseDouble(str); } catch (Exception e) { i = 0; } return i; } }