Can you please point out where am I going wrong?
Works fine:
Arrays.sort(arr, (a, b) -> a[0] - b[0] );
error: array required, but Object found
PriorityQueue<int[]> pq = new PriorityQueue(10, ( (a, b) -> a[0] - b[0] ));
error: incompatible types: incompatible parameter types in lambda expression
PriorityQueue<int[]> pq = new PriorityQueue(10, ( (int[] a, int[] b) -> a[0] - b[0] ));