Frank Jacobsen wrote:Is there a more effective way to do this, in sted off looping true the list, and put it into a Array and sort the Array ?
I'm not sure what this question really means. There's Collections.sort(List, Comparator) which sorts a List -- so if you used that, you wouldn't have to copy the List to an array. You could just sort it in place. Or there's List.toArray() which produces an array from a List -- so if you used that, you wouldn't have to write your own code to copy the List to an array.