Java Object hashCode() MethodhashCode() is the method of Object class. This method returns a hash code value for the object. This method is supported for the benefit of hash tables such as those provided by HashMap. SyntaxReturnsIt returns a hash code value for this object. Example 1Test it NowOutput: HashCode : JavaObjectHashcodeExample1@64 Example 2Test it NowOutput: HashCode : JavaObjectHashcodeExample2@65
Next TopicJava Object Class
|