| Author |
which code is hashcode
|
saikrishna cinux
Ranch Hand
Joined: Apr 16, 2005
Posts: 689
|
|
hi, here i am displaying a hashcode in three ways but which is the actual hashcode here please sombody tell me the actual hashcode... thanks in advance
|
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
|
 |
ak pillai
author
Ranch Hand
Joined: Feb 11, 2006
Posts: 288
|
|
All the above call the default hashCode method in your Object class. If you need to provide your own hashCode method then it should be an instance method with no argument as shown below: If you override the hashCode() method remember to override equals() method as well. If 2 objects are equal, then they should produce the same hashcode but the reverse is not true.
|
java j2ee job interview questions with answers | Learn the core concepts and the key areas
|
 |
 |
|
|
subject: which code is hashcode
|
|
|