Sorting an ArrayList<MyObject> by MyObject.getDate()
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.
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?