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:
files2.
Collections.sort(); lets you pass a custom comparator for ordering. For case insensitive ordering String class provides a static final comparator called CASE_INSENSITIVE_ORDER.
So in your case all that's needed is:
Collections.sort(caps, String.CASE_INSENSITIVE_ORDER);