Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//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;
        }
    }
}