Create Arraylist<Date>
of Date class. And use Collections.sort()
for ascending order.
Sorts the specified list into ascending order, according to the natural ordering of its elements.
For Sort it in descending order See Collections.reverseOrder()
Collections.sort(yourList, Collections.reverseOrder());