I am using ->
String ar[]=new String[n];
Arrays.sort(ar,new Comparator<String>());
I am getting the error as shown below
The method sort(T[], Comparator<? super T>) in the type Arrays is not applicable for the arguments (String[], Comparator<String>)
What should i do??
Comparatoris an interface. How exactly are you instanciating it?