title: Sorting dates in descending order
body: <p>I am trying to sort an array list in descending order according to the date field in the list. Here is how I extracted out the list of dates in string format:</p>
  
  <pre><code>SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy hh:mm a");
  List&lt;List&lt;String&gt;&gt; list= viewModel.getAllData(reminderlist);
  
  for(int i = 0; i &lt; list.size(); i++){
     System.out.println("DATE " + list.get(i).get(3));
     System.out.println("DATE FORMAT " + formatter.parse(list.get(i).get(3));
  }
  </code></pre>
  
  <p>The sample data for the println are:</p>
  
  <pre><code>"09/05/2019", "10/16/2017", "06/24/2020", "10/16/2017", "10/17/2015"
  </code></pre>
  
  <p>Then, I found <a href="https://stackoverflow.com/questions/5927109/sort-objects-in-arraylist-by-date">some solution</a> online but I not sure how to actually apply them onto my case since mine has no object, therefore I cannot do something like <code>Collections.sort(myList, new Comparator&lt;MyObject&gt; {}</code></p>