SyntaxFix
Write A Post
Hire A Developer
Questions
use reverse for loop to print in descending order,
for (int i = ar.length - 1; i >= 0; i--) { Arrays.sort(ar); System.out.println(ar[i]); }