title: Is it valid to compare a double with an int in java?
body: <pre><code>Utilities.getDistance(uni, enemyuni) &lt;= uni.getAttackRange()
  </code></pre>
  
  <p>Utilities.getDistance returns double and getAttackRange returns int. The above code is part of an if statement and it needs to be true. So is the comparison valid?</p>
  
  <p>Thanks</p>