title: Is double equal (==) for comparing two int in java is accurate?
body: <p>I was trying to compare the int value of a loop to with index of the array and was using the double equal for comparison. Using double equal for int values is it accurate and safe? As I read that == would just compare the object references but not the actual content. Please correct me if i am wrong. </p>
  
  <pre><code>for(int i = 0; i &lt; myobject.length; i++) {
      if(i == 0) {
          //Handle some logic here
      }
  }
  </code></pre>