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) {

        // initializing unsorted long array
        long lArr[] = { 221, 10, 111, 62, 46 };

        System.out.println(Arrays.toString(lArr));

        // sorting array
        Arrays.sort(lArr);

        System.out.println(Arrays.toString(lArr));
    }
}