Java tutorial
//package com.java2s; public class Main { public static double doubleFromString(String s) { try { double val = Double.valueOf(s.toString().replace(",", "")); return val; } catch (NumberFormatException e) { } return 0; } }