code: public static void main(String[] args) {
  
          List<File> list = new ArrayList<File>();
          getFilesAndDirs(new File(args[0]), list);
  
          File[] files = new File[list.size()];
          for (int i = 0; i < files.length; i++) {
              files[i] = (File) list.get(i);
          }
  
          print("Before sorting", files);
  
          Arrays.sort(files);
          print("Default File sorting", files);
  
          Arrays.sort(files, new FileComparator());
          print("Sorted with FileComparator", files);
  
          Arrays.sort(files, new FileComparator(true));
          print("Sorted with FileComparator in reverse", files);
      }
docs: Command-line entry point for simple testing of this class. Given a
  directory, get all files and dirs (recursively) in no particular order.
  Print all filenames (using spaces to denote directory names) in unsorted,
  default sorted, and FileComparator sorted order.