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 Object array
        Object ob[] = { 27, 11, 44, 22, 0 };

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

        // sorting array
        Arrays.sort(ob);

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