My query is not on how this is achieved but on the ordering of the names.
Using the Collections class alone ordering can be achieved as I would expect (by first and then last name) though I know a more involved approach is required.
So given the names list, can someone leave an brief example of what the resultant list should be like? I'm now confused in thinking that the ordering is different to how I perceive it to be?
Are the surnames supposed to be incorporated with the first names so that there is one list ordered be it a first name or surname.
A sample of the desired output (not the code!) will send me on my way again!
I see what you mean now. My understanding of the question made me think it was 'order by first name, last name' much in the same way a select from database would return if ordered that way(which happens to be the way the natural sort from arraylist occurs) . So , what it's asking for is two results, the original list sorted two ways, first by first name and then by last name as in your example?