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 short array
        short sArr[] = { 212, 1, 19, 2, 5 };

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

        // sorting array
        Arrays.sort(sArr);

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