MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.Arrays;

public class MainClass {
    public static void main(String args[]) throws Exception {
        String[] a = new String[] { "A", "C", "B" };
        Arrays.sort(a);
        for (int i = 0, n = a.length; i < n; i++) {
            System.out.println(a[i]);
        }
    }
}