title: Java: Check if next "field" in array exists
body: <p>Ive made this:</p>
  
  <pre><code>if( tal[i+1] ){
      if( tal[i] == tal[i+1]){
          match=true;
      }
  }
  </code></pre>
  
  <p>But it doesnt seem to work.</p>
  
  <p>I want to check whether the field next to the current (i) exists, in the array tal[].</p>
  
  <p>How can i fix this?</p>