Table of Content

How to sort elements in Long Array in Java?

Declaration :

Explanation :

Purpose The java.util.Arrays.sort(long[]) method sorts the specified array of longs 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 :