Simple way to check if double value is greater than zero
<p>I have a double variable(<strong>employeeSalary</strong>) and I want to check if this value is greater than(>) zero(<strong>0</strong>). I can think of very naive way to write this code but I am not sure if for <strong>double</strong> data type this is correct way to write.</p>

<pre><code>if(employeeSalary &gt; 0){
  // Employee salary is greater than zero.
}else{
  // Employee salary is less than or equal to zero.
}
</code></pre>

<p>Can anyone please tell me if this approach works?</p>