Driver code
public static void main ( String [ ] args ) { int arr [ ] = { 1 , 5 , 8 , 9 , 6 , 7 , 3 , 4 , 2 , 0 } ; int n = arr . length ; Arrays . sort ( arr ) ; reverse ( arr ) ; System . out . println ( "Array after sorting : NEW_LINE"); for ( int i = 0 ; i < n ; ++ i ) { System . out . print ( arr [ i ] + " ▁ " ) ; } } }