Most Efficient Way to Compare 2 Primitives in Java?
<p>Which code is better or optimized or efficient?</p>

<pre><code>double a;
double b;

if (a == b)
  return true;
</code></pre>

<p>or</p>

<pre><code>if (a - b == 0)
   return true; 
</code></pre>