Since Contact extends java.lang.Object, you may find super.toString() gives you something you don't actually want. I have already told you there is a much neater way to deal with null values in your equals() method.
Beware of returning null anywhere. Actually you might get null even if you don't have that test in the method, because values where n ≥ top ought to be null anyway.
Joined: Oct 13, 2005
But that Contact class actually looks like object-oriented programming
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com