title: Java how to sort lowercase before uppercase strings
body: <p>I want the files to be ordered by their abs path name, but I want the lowercase to be sorted before the uppercase. Example: Let's say I got 4 files:</p>
  
  <pre><code>files2.add("b");
  files2.add("A");
  files2.add("a");
  files2.add("B");
  </code></pre>
  
  <p>the order with this code is: [A, B, a, b]
  I want it to be: [a, A, b, B]</p>
  
  <pre><code>import java.io.File;
  import java.util.*;
  
  public class Abs {
  
      public ArrayList&lt;File&gt; getOrder(ArrayList&lt;File&gt; files) {
          Collections.sort(files, new Comparator&lt;File&gt;() {
              public int compare(File file1, File file2) {
                  return file1.getAbsolutePath().compareTo(file2.getAbsolutePath());
              }
          });
          return files;
      }
  
  }
  </code></pre>