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

        char cArr[] = { 'j', 'a', 'v', 'a' };

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

        // sorting array
        Arrays.sort(cArr);

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