Question:
Is the value of Double.MIN_VALUE greater then, less then, or equal to zero?
Answer:
Greater than.
Double.MIN_VALUE is a constant holding the smallest positive nonzero value of type double, 2-1074.
Double.MIN_VALUE is a constant holding the smallest positive nonzero value of type double, 2-1074.
Code:
public class Example { public static void main(String args[]){ System.out.println("Double.MIN_VALUE: " + Double.MIN_VALUE); if(Double.MIN_VALUE > 0) { System.out.println("Double.MIN_VALUE greater than 0"); } else if (Double.MIN_VALUE < 0) { System.out.println("Double.MIN_VALUE less than 0"); } } }
Output:
$ java Example Double.MIN_VALUE: 4.9E-324 Double.MIN_VALUE greater than 0