Double.NEGATIVE_INFINITY in Java

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

Syntax:

double java.lang.Double.NEGATIVE_INFINITY 

A constant holding the negative infinity of type double.

Approach

Java

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

        System.out.println(Double.NEGATIVE_INFINITY);

    }
}

Output:

-Infinity

No comments:

Post a Comment