My List is being sorted by the alphabetical order after sorting by date while I'm adding the 4-5 items in my List
问题 My List is being sorted by the alphabetical order after sorting by date while I am adding extra 4-5 items in my List with different names. I want to sort my List by date and time only. here I have shared my code please help me to do so. thanks in advance. // Filters All patient to keep only single latest record of each patient id private List<PatientData> filterPatients(List<PatientData> allPatientData) throws ParseException { HashMap<String ,Pair<PatientData,Date>> filtered = new HashMap<>()