2 Attachment(s)
Sorting an ArrayList<MyObject> by MyObject.getDate()
Hi.
I'm attempting to SORT an ArrayList<MyObject> by (Type Date) MyObject.getDate()
My format is formatted by SimpleDateFormat by dd-mm-yyyy;
I'm using a custom comparator to sort my list.
I'm using Collections.sort(produuctList, new CustomComparator())
Problem my sorted list is only by dd and not dd-mm-yyyy.
Any ideas?
Attachment 1256
Attachment 1255
Re: Sorting an ArrayList<MyObject> by MyObject.getDate()
What is the code for your custom comparator? Does it take into account day, month, and year?