For example, I have two objects:
Icecream ice1 = new Icecream(vanilla, newDate(11, 09, 09));
Icecream ice2 = new Icecream(choko, newDate(10, 08, 08));
// where first argument is a String and second argument is a Date
how can I print the out so that they will be ordered by the date starting from earliest? (toStrign method is already configured)
Output sholud be:
Vanilla, 10-08-08
Vanilla, 11-09-09
Thank you!