Table of Content

How to sort elements in Integer Array in Java?

Declaration :

Explanation :

Purpose The java.util.Arrays.sort(int[]) method sorts the specified array of ints into ascending numerical order.
Parameters a ===> This is the array to be sorted.
Return Value This method does not return any value.
Exception NA

Java Program : Example

Below example will explain java.util.Arrays.sort() method.

Output of Program :