All Downloads are FREE. Search and download functionalities are using the official Maven repository.

testing-junit-component-under-test.src.main.java.org.gradle.SmartApp Maven / Gradle / Ivy

There is a newer version: 8.11.1
Show newest version
package org.gradle;

import java.util.Properties;

public class SmartApp {
    private static final double FACTOR;

    static {
        double factor = 0;
        try {
            Properties props = new Properties();
            props.load(SmartApp.class.getResourceAsStream("resource.properties"));
            factor = Double.valueOf(props.getProperty("factor", "0"));
        } catch (Exception ex) {
        } finally {
            FACTOR = factor;
        }
    }

    public double smartComputation(double x) {
        return FACTOR*x;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy