title: Get the oldest Timestamp in list Java
body: <p>Is this correct? </p>
  
  <pre><code>ArrayList&lt;Timestamp&gt; timeStampList = new ArrayList&lt;Timestamp&gt;();
  timeStampList.add(0, new Timestamp(System.currentTimeMillis())); 
  
  Thread.sleep(600); 
  
  timeStampList.add(1, new Timestamp(System.currentTimeMillis()));
  
  Collections.sort(timeStampList);
  Timestamp tempStamp = timeStampList.get(0);
  for (Timestamp startstamp : timeStampList)
  {
      if (tempStamp != startstamp)
      {
              long diffTime = startstamp.getTime() - tempStamp.getTime();
              diffDays = diffTime / (1000 * 60 * 60);
  
              if(diffDays &gt; 24)
              {
                  System.out.println(diffDays / 24 +"Day" + " "+diffDays % 24 + "hours");
              }
              tempStamp = startstamp;
      }
  }
  </code></pre>
  
  <p>I am NOT sure how I can find the oldest timestamp in the array list. Any advice or direct answer is appreciated. Thanks a lot. This current code I think only compares. </p>
  
  <p><strong>EDIT: So assume I do not use Collection.sort in this context, I know I did apply that when I posted, but lets assume I want to know how to compare and find the oldest timestamp of all in the arrayList via a for-loop.</strong></p>