Sorting a queue object by date and time (dd-MM-yyyy hh:mm:ss) with multiple instance variables #java?

I have a project due in 4 days, and I could not find a way to sort the queue object by its date. I have tried using collections.sort, but that only accepts variables, not objects. I have tried taking out the date from the queue object, but sorting the date with no ID (the instance variable) would be pointless.... show more I have a project due in 4 days, and I could not find a way to sort the queue object by its date. I have tried using collections.sort, but that only accepts variables, not objects. I have tried taking out the date from the queue object, but sorting the date with no ID (the instance variable) would be pointless. (Example : Sorting appointment date with no patient ID or doctor ID)
2 answers 2