Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    /**
     * Indicates whether the given double valid, implying it is not null, not
     * infinite and not NaN.
     *
     * @param d the double.
     * @return true if the given double is valid.
     */
    public static boolean isValidDouble(Double d) {
        return d != null && !Double.isInfinite(d) && !Double.isNaN(d);
    }
}