Got stuck in the following problem. I populated a ArrayList from the database which is as below. But found that I need to group the list based on names (if the other two values in the first list match with second list) . And after grouping, I need to sort the names in ascending order. I am unable to find a solution to this. How should I iterate it, group and sort names?
VerDetail (0)
Date : Aug 3,2016 Type : Income Name : Tom
VerDetail (1)
Aug 3,2016 SSN Tom
VerDetail (2)
Aug 3,2016 Income Ben
VerDetail (3)
Aug 3,2016 SSN Ben
VerDetail (4)
Aug 3,2016 Income Jack
VerDetail (5)
Aug 3,2016 SSN Jack
I want my list to be grouped on names as below,
VerDetail (0)
Aug 3,2016 Income Ben Jack Tom
VerDetail (1)
Aug 3,2016 SSN Ben Jack Tom