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

        byte bArr[] = { 10, 17, 4, 7, 2 };

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

        // sorting array from index 1 to 4
        Arrays.sort(bArr, 1, 4);

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