@SuppressWarnings("unchecked") private static <E>void sort(Object[] array,Comparator<? super E> comparator){
  Arrays.sort(array,(Comparator<Object>)comparator);
}

@ SuppressWarnings ( "unchecked" ) private static < E > void sort ( Object [ ] array , Comparator < ? super E > comparator ) { Arrays . sort ( array , ( Comparator < Object > ) comparator ) ; }
sort the array , according to the comparator .
