Decode School

Decode School - The School for Problem Solvers

Welcome to my blog. Subscribe and get my latest blog post in your inbox.

Java Program to Sort the Elements in descending order.

Get array size n and n elements of array, then sort the elements of array in descending order.

Sample Input 1:

5 5 7 9 3 1

Sample Output 1:

9 7 5 3 1

Program or Solution


Program Explanation

With the help of the Selection sort the program is done