title: Compare a Date inside a ArrayList customized
body: <p>How can I compare date values inside an <code>ArrayList</code>?</p>
  
  <p>I created this:</p>
  
  <pre><code>ArrayList&lt;newContact&gt; contactList
  </code></pre>
  
  <p>Then inside the constructor I got as a parameter: </p>
  
  <pre><code>(String address, String body, long date)
  </code></pre>
  
  <p>I would try something like this:</p>
  
  <pre><code>Collections.sort(contactList.get(i).date);
  </code></pre>
  
  <p>But I know it's wrong, so if someone could help me thank you :)</p>