java - Can you explain me hashCode() method? -
int hashcode(){ final int p=43; int h=0; h=h*p+hashcode(); return h; }
i don't know how works. when method exit? in way, has elements not same hashcode?
this function not work.
it infinitely recursive (i.e. calls itself) on control paths.
the local variable final int p=43;
not used; lower case p
must field of class in function method; else compilation have failed.
Comments
Post a Comment