title: Java ArrayList: contains() method returns false when arraylist contains the given object
body: <p>I have a problem with the <code>contains()</code> method which returns false even though the <code>ArrayList</code> contains the given <code>Object</code>.
  My code is following:</p>
  
  <pre><code>String [] transaction = dbConnection.getPendingTransaction(username);
  if (!onlineConnection.getSentTransactionRequests().contains(transaction)) {
      onlineConnection.getSentTransactionRequests().add(transaction);
  
      String packet = "RTR" + "_" + transaction[0] + "_" + transaction[2] + 
                          "_" + transaction[3] + "_" + transaction[4];
      onlineConnection.send(packet);
  }
  </code></pre>
  
  <p>I have tried <code>Thread.sleep()</code> between iterations, so the <code>ArrayList</code> wasn't load as eagerly without success.</p>