Can somebody tell me | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Can somebody tell me

} @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((name == null) ? 0 : name.hashCode()); return result; } Why is prime = 31. And result = 1. Thank q

28th Apr 2019, 5:51 PM
stephen haokip
stephen haokip - avatar
1 Answer
+ 5
What exactly is name? It's not defined anywhere.
30th Apr 2019, 12:18 PM
Sonic
Sonic - avatar