Below is my list which will always be in the form of aXXXX
-
List<String> child = Arrays.asList("a5", "a10", "a2", "a1", "a40");
System.out.println(child);
My child
list will always have strings in the form of aXXXX
Now I need to sort my above lists and extract the largest string from it..
So in the above example, it will be a40
. I was initially thinking to use Collections.sort(child);
but it's not sorting them out in the ascending order properly.