Java float and double diff
<p>I am using jdk 1.6. This is my code. </p>

<pre><code>float f = 10.0f;

double d = 10.0; 

System.out.println("Equal Status : " + (f == d)); 
</code></pre>

<p>then the system shows the answer as <code>true</code>.  But if I modified the value as </p>

<pre><code>float f = 10.1f; 

double d = 10.1; 

System.out.println("Equal Status : " + (f == d));
</code></pre>

<p>then the system shows the answer as false. I know the system use Bit matching for == checking. But what is the reason behind. Can you explain about it? Thanks in advance.</p>
