Page 1 of 3 123 LastLast
Results 1 to 15 of 40
  1. #1
    Registered User
    Join Date
    May 2016
    Posts
    26

    What is hashCode?

    What is hashCode?

  2. #2
    Registered User robertclark1's Avatar
    Join Date
    Jun 2015
    Location
    3990 Centre St # 307, San Diego, CA 92103
    Posts
    56
    A hashcode is a number generated from any object. This is what allows objects to be stored/retrieved quickly in a Hashtable. Imagine the following simple example: On the table in front of you you have nine boxes, each marked with a number 1 to 9.

  3. #3
    Registered User
    Join Date
    Jul 2015
    Posts
    15
    A hashcode is a number generated from any object. This is what allows objects to be stored/retrieved quickly in a Hashtable. Imagine the following simple example: On the table in front of you you have nine boxes, each marked with a number 1 to 9.

  4. #4
    Senior Member
    Join Date
    Jun 2013
    Location
    Forum
    Posts
    5,019
    In the Java programming language, every class implicitly or explicitly provides a hashCode() method, which digests the data stored in an instance of the class into a single hash value (a 32-bit signed integer). This hash is used by other code when storing or manipulating the instance – the values are intended to be evenly distributed for varied inputs for use in clustering.
    Cheap VPS | $1 VPS Hosting
    Windows VPS Hosting | Windows with Remote Desktop
    Cheap Dedicated Server | Free IPMI Setup

  5. #5
    Registered User
    Join Date
    Apr 2016
    Location
    UK
    Posts
    11
    HashCode is a mathematical formula that returns some integer value. This integer value is used as index in array.

  6. #6
    Registered User
    Join Date
    May 2016
    Posts
    25
    I think we use #hasteg in facbook, google plus, twitter and pintrest

  7. #7
    Member
    Join Date
    May 2016
    Posts
    76
    hashCode() is used for bucketing in Hash implementations like HashMap, HashTable, HashSet, etc.

    The value received from hashCode() is used as the bucket number for storing elements of the set/map. This bucket number is the address of the element inside the set/map.
    CertifyGuide – The Ultimate Source of Certification Exam Preparation Guides

  8. #8
    Senior Member
    Join Date
    May 2016
    Location
    Delhi
    Posts
    144
    A hashcode is a number generated from any object. This is what allows objects to be stored/retrieved quickly in a Hashtable. Imagine the following simple example: On the table in front of you you have nine boxes, each marked with a number 1 to 9.

  9. #9
    Senior Member
    Join Date
    Jul 2016
    Posts
    126
    Hashcode is a digit generated from any object. This is what allows objects to be retrieved quickly in a Hash table.

  10. #10
    Senior Member
    Join Date
    Jun 2016
    Posts
    196
    A hashcode is a number produced from any article. This is the thing that permits articles to be put away/recovered rapidly in a Hashtable. Envision the accompanying straightforward case: On the table before you have nine boxes, each set apart with a number 1 to 9.

  11. #11
    Junior Member
    Join Date
    Jul 2016
    Posts
    26
    A hashcode is a number generated from any object. This is what allows objects to be stored/retrieved quickly in a Hashtable.
    Imagine the following simple example:
    On the table in front of you you have nine boxes, each marked with a number 1 to 9. You also have a pile of wildly different objects to store in these boxes, but once they are in there you need to be able to find them as quickly as possible.
    What you need is a way of instantly deciding which box you have put each object in. It works like an index; you decide to find the cabbage so you look up which box the cabbage is in, then go straight to that box to get it.
    Now imagine that you don't want to bother with the index, you want to be able to find out immediately from the object which box it lives in.
    In the example, let's use a really simple way of doing this - the number of letters in the name of the object. So the cabbage goes in box 7, the pea goes in box 3, the rocket in box 6, the banjo in box 5 and so on. What about the rhinoceros, though? It has 10 characters, so we'll change our algorithm a little and "wrap round" so that 10-letter objects go in box 1, 11 letters in box 2 and so on. That should cover any object.
    Sometimes a box will have more than one object in it, but if you are looking for a rocket, it's still much quicker to compare a peanut and a rocket, than to check a whole pile of cabbages, peas , banjos and rhinoceroses.
    That's a hash code. A way of getting a number from an object so it can be stored in a Hashtable. In Java a hash code can be any integer, and each object type is responsible for generating its own. Lookup the "hashCode" method of Object.

  12. #12
    Senior Member
    Join Date
    Jan 2016
    Location
    India
    Posts
    273
    Quote Originally Posted by RH-Calvin View Post
    In the Java programming language, every class implicitly or explicitly provides a hashCode() method, which digests the data stored in an instance of the class into a single hash value (a 32-bit signed integer). This hash is used by other code when storing or manipulating the instance – the values are intended to be evenly distributed for varied inputs for use in clustering.
    Thank You Very Much...for all valuable explanation

  13. #13
    Member
    Join Date
    Aug 2015
    Location
    London
    Posts
    67
    A hash code is a numeric value that is used to identify an object during equality testing.

  14. #14
    Junior Member
    Join Date
    Jun 2016
    Location
    Jasmen St, building Num: 105, Amman, Jordan
    Posts
    14
    Hashcode is a number produced from any item. This is what allows things to be recovered easily in a Hash desk.

  15. #15
    Registered User
    Join Date
    May 2016
    Location
    8950 Olympic Blvd., #142, Beverly Hills, CA 90211
    Posts
    18
    A hashcode is a number generated from any object. This is what allows objects to be stored/retrieved quickly in a Hashtable. Imagine the following simple example: On the table in front of you you have nine boxes, each marked with a number 1 to 9.

Page 1 of 3 123 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

  Find Web Hosting      
  Shared Web Hosting UNIX & Linux Web Hosting Windows Web Hosting Adult Web Hosting
  ASP ASP.NET Web Hosting Reseller Web Hosting VPS Web Hosting Managed Web Hosting
  Cloud Web Hosting Dedicated Server E-commerce Web Hosting Cheap Web Hosting


Premium Partners:


Visit forums.thewebhostbiz.com: to discuss the web hosting business, buy and sell websites and domain names, and discuss current web hosting tools and software.