Home > Back-end >  Sort an array scheduling problems for help
Sort an array scheduling problems for help

Time:10-05

Default to ascending order, could you rewrite the collation to descending sort an array?
How to implement

CodePudding user response:

The Arrays. Sort (array, Comparator. ReverseOrder ());

CodePudding user response:

reference 1/f, LucT response:
Arrays. The sort (array, Comparator. ReverseOrder ());

Can be directly for ordering rules rewritten, directly use the sort (list) will be descending order?

CodePudding user response:

reference 1/f, LucT response:
Arrays. The sort (array, Comparator. ReverseOrder ());

Like a Collections. The sort (list) as easy ascending
  • Related