I have a list of Student type objects. I want the elements of this list to be sorted according to the Student name.
How should I deal with that ? Thanks
posted 7 years ago
Create a Comparator object which returns differences between names (possibly even divided into first name, last name). Assuming you aren't supposed to use the Collections class methods, you will have to implements one of the standard searching algorithms, taking your List and the Comparator as parameters. There have been several posts about how to find sorting algorithms this last week; have a search through the beginner's forum.