title: What hashing function does Java use by default and can we override the default behavior?
body: <p>I am going through the <a href="http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures/lecture-7-hashing-hash-functions/" rel="noreferrer">Introduction of Algorithms by Cormen et al</a> video and it discusses several hashing functions . I want to know what hashing function does Java use by default?Does the hashing function actually differ for different types of objects that are used as keys? Is there an api in the Collections framework which let us write our own hashing algorithm ?</p>