Respuesta :

Answer:

import java.util.Arrays;

public class sort{

    public static void main(String []args){

       int[] arr = {2,6,9,1,5,3};

       int n = arr.length;

       Arrays.sort(arr);

       for(int i=0;i<n;i++){

          System.out.println(arr[i]);

       }    

    }

}

Explanation:

first import the library Arrays for using inbuilt functions.

create the main function and define the array with elements.

then, use the inbuilt sort function in java which sort the array in ascending order.

syntax:

Arrays.sort(array_name);

then, use for loop for printing the each sorting element on the screen.