How to sort string list apart from ascending or descending order based on ACII table using comparator or comparable.
Let us assume that a string list contains words which starts with either number (1start) or special character (@fill) or lowercase (kind) or uppercase (Link)
Sample scenario: I would like to sort the list in this particular order: (sorting an be either asc or desc)
- words which starts with 'lowercase' should be sorted first,
- words which starts with 'special' character should be sorted second,
- words which starts with 'number' should be sorted third,
- words which starts with 'uppercase' should be sorted fourth