I find the javadoc is a pretty useful tool when I'm wondering how to do something.
http://download.oracle.com/javase/7/docs/api/java/lang/Object.html
Check out the equals method.
Ask yourself "how do I know that a HugeInteger is the same as another HugeInteger".
For a
String, "hi" is the same as "hi" but not the same as "goodbye" that is to say the same letters must be present in the same order. If they're not then the strings are different.
(Note for good programming practice you will also want to look at hashCode(), but that's mentioned a lot around here. )
And (as Campbell would say)
Welcome to the Ranch.