I had a problem today that I believe I finally solved....here's the problem...
Given an array as follows
{"A10", "A2", "12", "Z1", "A100"}
sort it such that the array is
{"12", "A2", "A10", "A100", "Z1"}
The normal Arrays.sort(array)...would return the following
{"12", "A10", "A100", "A2", "Z1"}
Here's the code and the Junit Test Case
Don't know what JUnit is....click here
Have any idea's of how to do this better??
6:57:16 PM
|
|