I am able to get output for this:
int arr[][]={{1,2},{2,3},{3,4},{1,3}};
Arrays.sort(arr,(a,b)->(b[0]-a[0]));
But it's showing error for this:
int arr[]={1,2,3,4,5,6};
Arrays.sort(arr,(a,b)->(b-a));
Error: method Arrays.<T#1>sort(T#1[],Comparator<? super T#1>) is not applicable
What am I missing here?