What is the fastest way to sort an ArrayList (in descending/ascending manner) that contains numbers, eg: { \"12\", \"3.5\", \"188\", \"33.03
ArrayList
{ \"12\", \"3.5\", \"188\", \"33.03
You can use Collections.sort() on List, String is Comparable, but that comparison won't give you the right result.
Collections.sort()
List
Comparable
Also you can define your own Comparator, and pass it to Collections.sort().
Comparator