1Arrays.sort(myArr,(double[] a,double[] b)->{
2                //here multiple lines of code can be placed
3                return a[0]-b[0]; 
4            });1Arrays.sort(contests, (a, b) -> Integer.compare(b[0],a[0])); //decreasing order
2    
3Arrays.sort(contests, (a, b) -> Integer.compare(a[0],b[0]); //increasing order
4