title: How to sort Date which is in string format in java?
body: <p>I have an <code>arraylist</code> with string values like</p>
  
  <pre><code>ArrayList&lt;String&gt; datestring=new ArrayList&lt;String&gt;();
  datestring.add("01/21/2013 @03:13 PM");
  datestring.add("01/21/2013 @04:37 PM");
  datestring.add("01/21/2013 @10:41 AM");
  datestring.add("01/21/2013 @10:48 AM");
  datestring.add("01/22/2013 @06:16 AM");
  datestring.add("01/22/2013 @06:19 AM");
  datestring.add("01/21/2013 @05:19 PM");
  datestring.add("01/21/2013 @05:19 PM");
  </code></pre>
  
  <p>Can any body help me on sorting the above list? So that the values are sorted according to AM and PM format.<br>
  The expected output after sorting should be</p>
  
  <pre><code>for (String s : datestring)
  {
      System.out.println(s);
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>01/21/2013 @10:41 AM;
  01/21/2013 @10:48 AM;
  01/21/2013 @03:13 PM;
  01/21/2013 @04:37 PM;
  01/21/2013 @05:16 PM;
  01/21/2013 @05:19 PM;
  01/22/2013 @06:16 AM;
  01/22/2013 @06:19 AM;
  </code></pre>