Float.MAX_VALUE in Java

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

Syntax:

float java.lang.Float.MAX_VALUE

A constant holding the largest positive finite value of type float (i.e 3.4028235E38).

Approach

Java

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

        System.out.println(Float.MAX_VALUE);

    }
}

Output:

3.4028235E38

No comments:

Post a Comment