[java] Ascending and Descending Number Order in java

You could take the ascending array and output in reverse order, so replace the second for statement with:

for(int i = arr.length - 1; i >= 0; i--) {
    ...
}

If you have Apache's commons-lang on the classpath, it has a method ArrayUtils.reverse(int[]) that you can use.

By the way, you probably don't want to sort it in every cycle of the for loop.