Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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));
    }

}