1
public class Foo
 { 
    public static void main(String[] args) { 
    System.out.println(Math.min(Double.MIN_VALUE, 0.0d));
 } 
}

I am getting 0.0 answer why? what is the reason behind this?`
In the another post it explains Double.MIN_VALUE is the least positive value but here my result is 0.0 which is neither positive nor negative according to English language.

  • 2
    Commenting on your edit, you are printing out `Math.min(Double.MIN_VALUE, 0.0d)`, so which is smaller, `Double.MIN_VALUE` or 0? – Ken Y-N Aug 28 '17 at 02:14
  • Ok, bro now I understand why it is so. Print 0.0 because of Double.MIN_VALUE is greater than 0 – Neelesh Bansal Aug 28 '17 at 02:16

0 Answers0