why 2.1/1000 = 0.0021000000000000003 in java?

Posted by Vivart on Stack Overflow See other posts from Stack Overflow or by Vivart
Published on 2010-04-30T07:25:06Z Indexed on 2010/04/30 7:27 UTC
Read the original article Hit count: 148

Filed under:
double value = 2.1/1000;
System.out.println(value);

why o/p is 0.0021000000000000003

© Stack Overflow or respective owner

Related posts about java