I have an array of Strings like so:
String[] array = { "CC/2", "DDD/3", "AAAA/4", "B/1" };
Arrays.sort(array);
System.out.println(Arrays.toString(array));
When I execute this code, I get the following:
[AAAA/4, B/1, CC/2, DDD/3]
This is correct, however I want to sort it by the numbered value instead, so that I get the following result:
[B/1, CC/2, DDD/3, AAAA/4]
How do I go about doing this?