Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Java in General
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Java in General
String HashCode
Hemant Chhonkar
Greenhorn
Posts: 1
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Can somebody tell me why
String
's hashCode is calculated with 31 ?
what is the reason behind dis ?
Jesper de Jong
Java Cowboy
Posts: 16084
88
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Welcome to the Ranch.
There's no really simple answer to that question, but you're not the first person asking it. Have a look at this:
Why do hash functions use prime numbers?
Jesper's Blog
-
Pluralsight Author Page
sunglasses are a type of coolness prosthetic. Check out the sunglasses on this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
why equals() and hashCode() should override
Can an abstract class contain main() method or not?
how paint method works in java like Pixel Location Width Height .?
Question on Garbage Collection
Expain me what is hashCode() method
More...