title: Equals method not working
body: <p>I am  a new Java programmer , im trying to implement a method to check the equality between two "features" array inside my object "FeatureVector"
  seems really basic but the method is not working for some reason ; it doesnt produce logical results ,and i cant seem to find a solution, please help </p>
  
  <pre><code>public boolean equals (FeatureVector x )
  {
      boolean result =false ; 
      boolean size = false ;
      for (int i =0 ; (i &lt; this.features.length &amp;&amp; result == true );i ++  )
      {
          if (this.features[i] == x.features[i] ) {result = true ;}
          else {result = false ; }
      }
  
      if (this.features.length == x.features.length ) {size = true ;}
      else {size =false; }
      return (result &amp;&amp; size) ; 
  }
  </code></pre>