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

Popular posts from this blog

authentication - Mongodb revoke acccess to connect test database -

ios - Realm over CoreData should I use NSFetchedResultController or a Dictionary? -

r - Update two sets of radiobuttons reactively - shiny -