I have an arraylist "list" which is holding the calendar objects. I need to sort the arraylist. And the code is as belo.
-------->> This way i am setting the calendar objects into the arraylist.
--------->> This is where i am calling the returndate method which will sort the arraylist and return the calendar object.
--------->>This is the method which takes the arraylist as input and it wil sort and send the calendar object which is at the index 0.
During the program execution, when it comes to the above highlighted line, it is giving the below exception