• 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

what is hash code?

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
what is meant by hash code? Advanced thanks for clearing my doubts
Sasi
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hash tables /Hashmap/Hashset is like a dictionary ,
it maps keys to specific values.
A key finds a value in a array like structure.
It is called hashing because when one converts
keys into subscripts it scrambles the bits. the bits
form a number that is useful to store and retreive data.
A problem with hashtables is collisions ( 2 keys for the
same cell) To prevent this every cell in a hashtable
is also a bucket ( a linked list ) of all the key and
value pairs that match that specific cell.
The package java.util uses this for hashtables.
The load factor in hashing is the ratio of filled cells
to the size of the hashtable. The higher the number , the
more likely collisions are!

 
You showed up just in time for the waffles! And this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic