Dear Readers,
So there is an eficient way, after all. I have read the suggestions and I shall improve my code as soon as possible and post it here. Thanks very much.
But, I still haven't understood the last suggestion:
Finally, compareTo() is not required to return +/-1 or 0; it can return any positive or negative value. Therefore a nice shortcut to compare n1 and n2 is to return n1-n2, which returns a value of the right sign, or zero, as needed in each case.
When you say that I have to return n1-n2, does it refer to the Person references(in my program)? How and why will it return an Integer. I am confused!