title: Sorting a list of dates as a String in Java
body: <p>I have a list of dates as String in my arrayList. I need to get the lowest date value from this list and then compare to the date which is in "dd-MM-yy" format. How can I do that?? </p>
  
  <p>Here is my code::  </p>
  
  <pre><code>List&lt;String&gt; dateList = new ArrayList&lt;String&gt;();
  for(DailyDataReading ddr: finalResult){
      dateList.add(sdf.format(ddr.getDailyReadingDate()));
  }
  
  Collections.sort(dateList);
  
  if((sdf.format("date which is to be compared")).compareTo(dateList.get(dateList.size()-1))&lt;=0)
   {...}
  </code></pre>