6
Q:

sort 2d array based on one column java

Arrays.sort(myArr,(double[] a,double[] b)->{
                //here multiple lines of code can be placed
                return a[0]-b[0]; 
            });
4
Arrays.sort(myArr, (a, b) -> a[0] - b[0]);
0
Arrays.sort(array, Comparator.comparingDouble(o -> o[0]));
0

New to Communities?

Join the community