To sort Array in java

CODE :

import java.util.Arrays;

public class P_01_Array{
public static void main(String[] args) {
int arr[]={33,3,4,5,90,10,12,42};
Arrays.sort(arr);

        System.out.printf("Modified arr[] : %s",Arrays.toString(arr));
}
};
  
Output :


Comments

Popular posts from this blog

To implement the various components of HTML5 Canvas

Program to illustrate the concept of templates.

Program to illustrate the order of execution of constructors and destructors in inheritance.