If you execute:
System.out.println(someObj.toString());
you probably see the output like
someObjectClassname@hashcod
Adding something useful.
Some newbies may be confused as to why the hascode value returned via toString()
is different than what is returned via hashCode().
This is because the toString() method returns a hex representaion of the same hashcode .
Integer.toHexString(object.hashCode()); will return the same value returned by object.toString().