Java tutorial
//package com.java2s; public class Main { /** * Str to double. * * @param str the str * @return the double */ public static double strToDouble(String str) { try { return Double.parseDouble(str); } catch (Exception e) { e.printStackTrace(); } return 0; } }