title: How to compare value in array?
body: <p>how to compare value in an array?</p>
  
  <p>I have array named list which contains 12 elements. I see if value in index 0 is equal or not equal to value in index 2. </p>
  
  <p>I have tried this code but it doesnt seems to work. </p>
  
  <pre><code>if ((list.get(0)==list.get(2) &amp;&amp; list.get(1)==list.get(3)) 
  {
     System.out.println("equal")
  }
  </code></pre>