I'll try... take a look at this
Running this gives the following:
t1 hashcode: 3
t1.equals(t1)? true
t1 hashCode: 3 t2.hashCode: 3 are equal?: true
t1.equals(t2)? true
t1 hashCode: 3 t3.hashCode: 3 are equal?: true
t1.equals(t3)? false
Things to note:
t1 equals itself (t1.equals(t1))t1.equals(t2) is true AND their hashcodes are the samet1.equals(t3) is FALSE even though their hashcodes are the same You might also want to look at the equals() and hashCode() documentation in the
Object class
Hope this helps
[ April 09, 2004: Message edited by: Richard Quist ]