Java tutorial
//package com.java2s; public class Main { /** * * @param number * @return */ public static Double convertStringToDoubleObject(String number) { if (number == null || number.isEmpty()) { return null; } try { return Double.parseDouble(number); } catch (NumberFormatException e) { return null; } } }