Java tutorial
import java.util.Arrays; public class Main { public static void main(String[] args) { Integer[] numbers = { 1, 2, 3 }; Arrays.sort(numbers, (i1, i2) -> { return (i2 - i1); }); System.out.println(Arrays.toString(numbers)); } }