For example i have List with content: {1 5 2b 10 2a 3 7}, and i need sort it in alphabet order as: {1 2a 2b 3 5 7 10}. I tried with Comparator interface as:
Collections.sort(list);
But it returned array {1 10 2a 2b 3 5 7}. How i can do it in Java?