Double.NaN in Java

Double.NaN: This is available in java.lang.Double class of Java.

Syntax:

double java.lang.Double.NaN 

A constant holding a Not-a-Number (NaN) value of type double.

Approach

Java

public class DoubleNaN {
    public static void main(String[] args) {

        System.out.println(Double.NaN);

    }
}

Output:

NaN

No comments:

Post a Comment