Float and Double classes define MAX_VALUE, MIN_VALUE, POSITIVE_INFINITY, and NEGATIVE_INFINITY. : double « Java Source And Data Type « SCJP






public class MainClass {
  public static void main(String[] argv) {
    System.out.println(Float.MAX_VALUE);
    System.out.println(Double.MAX_VALUE);
    System.out.println(Float.MIN_VALUE);
    System.out.println(Double.MIN_VALUE);
    System.out.println(Float.NEGATIVE_INFINITY);
    System.out.println(Double.POSITIVE_INFINITY);
  }
}
3.4028235E38
1.7976931348623157E308
1.4E-45
4.9E-324
-Infinity
Infinity








1.14.double
1.14.1.Attach a D or d to double literals, but it is not necessary.
1.14.2.NaN values indicates that a calculation has no result in ordinary arithmetic
1.14.3.A value containing a decimal point is assumed to be the 64-bit double,
1.14.4.Division by zero in floating-point-arithmetic: No exception occurs;
1.14.5.See if a floating-point result is NaN, use the Float.isNaN or Double.isNaN static method.
1.14.6.Float and Double classes define MAX_VALUE, MIN_VALUE, POSITIVE_INFINITY, and NEGATIVE_INFINITY.