Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: LGPL 

import java.util.Properties;

public class Main {
    public static double getDoubleProperty(Properties properties, String key, double defaultValue) {
        if (properties != null) {
            String value = properties.getProperty(key, "").trim();

            if (!value.equals("")) {
                try {
                    return Double.parseDouble(value);
                } catch (NumberFormatException var6) {
                    ;
                }
            }
        }

        return defaultValue;
    }
}