code: public static <T> T[] sort(T[] array, Comparator<T> comparator) {
  
      Arrays.sort(array, comparator);
  
      return array;
    }
docs: Sorts the elements in the given array.
  
  @param <T> {@link Class} type of the elements in the array.
  @param array array of elements to sort.
  @param comparator {@link Comparator} used to sort (order) the elements in the array.
  @return the given array sorted.
  @see java.util.Comparator