Floating Point Numbers
<p>This seems like a real simple question but I just to want clear my doubt. I am looking at code which some other developer wrote. There are some calculations involving floating-point numbers.</p>

<p>Example: <code>Float fNotAvlbl = new Float(-99);</code> Why is he creating a new object? What would happen if we do <code>Float fNotAvlbl = -99;</code>(-99 is used as flag here to indicate Not Applicable) Later down the code, we define: </p>

<pre><code>fltValue1 = 0.00f;
fltValue2 = 0.00f;
</code></pre>

<p>and populate these two values with a method call which returns float. After that we again convert these two values into Float Objects with:</p>

<pre><code>fltVal1 = new Float(fltValue1); 
fltVal2 = new Float(fltValue2); 
</code></pre>

<p>and than do a comparison <code>if(fltVal1.compareTo(fNotAvailable) == 0) do something.</code><br>
Is it all because compareTo expects Wrapper Class Objects?</p>

<p>I apologize if this is a real basic question.</p>
