If inc = 1 , print s1 in decreasing order
if ( inc == 1 ) { Arrays . sort ( s1 ) ; for ( int k = 0 ; k < s1 . length / 2 ; k ++ ) { char temp = s1 [ k ] ; s1 [ k ] = s1 [ s1 . length - k - 1 ] ; s1 [ s1 . length - k - 1 ] = temp ; } System . out . print ( new String ( s1 ) ) ; }