Default sort method is not working for me in Java.
int[] nums = {11,14,15,10};
Arrays.sort(nums, new Comparator<Integer>() {
public int compare(Integer a, Integer b) {
// compare code here
}
});
The error I get is
"The method sort(int[]) in the type Arrays is not applicable for the arguments (int[], new Comparator<Integer>(){})"
I feel like I am stupid now.