Double.MAX_VALUE in Java

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

Syntax:

double java.lang.Double.MAX_VALUE

A constant holding the largest positive finite value of type double (i.e. 1.7976931348623157E308)

Note:

It is equal to the hexadecimal floating-point literal 0x1.fffffffffffffP+1023 and also equal to Double.longBitsToDouble(0x7fefffffffffffffL).

Approach

Java

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

        System.out.println(Double.MAX_VALUE);

    }
}

Output:

1.7976931348623157E308

No comments:

Post a Comment