Double.NaN is an object
<pre><code>public class Double1 {    

    public static double parseDouble(String _s, double _def) {
        try {
            return Double.parseDouble(_s);
        }
        catch(Exception e) {
        }
        return _def;
    }

    public static void main(String[] args) {
        Double1 db=new Double1();
        boolean ab=db.parseDouble("vijay", Double.NaN)!=Double.NaN?true:false;
        System.out.println("ab value: "+ ab);
        System.out.println(Double.NaN==Double.NaN);
    }
}
</code></pre>

<p>It should return <code>true</code> where as the above code returns <code>false</code>. Why?</p>
