190
Every example I find is about doing this alphabetically, while I need my elements sorted by date.
My ArrayList contains objects on which one of the datamembers is a DateTime object. On DateTime I can call the functions:
lt() // less-than
lteq() // less-than-or-equal-to
So to compare I could do something like:
if(myList.get(i).lt(myList.get(j))){
// ...
}
What should I do inside the if block?