java sort using anonymous class Finally, I modified the sort function in this manner to get sorted data. Collections.sort(ls, new Comparator() { public int compare(Object o1, Object o2) { String sa = (String)o1; String... April 5, 2022 0 Comments