I have a String[] of prices that might look like this:
String[0] = 1.22
String[1] = 230.08
String[2] = 34.11
I need to cast the array and order it in ascending order. What is the best way to do this? The Array may be very large so performance important. Thank you in advance.
You can define a specialized string comparator:
and then sort your String array using:
(N.B. There may be more efficient ways of comparing two strings representing float values.)