60
Java Byte hashCode() method
The hashCode() method of Java Byte class returns a hash code for this Byte.
Syntax:
Parameters:
The parameter ‘value’ represents a value whose hash code is to be determined.
Overrides
The hashCode() method overrides hashCode in class Object.
Return Value
This method returns a hash Code value for this Byte.
Example 1
Output:
Hash Value = 0 Hash Value = 12 Hash Value = -1
Example 2
Output:
Hash Code = 123
Example 3
Output:
Error:(7, 18) java: byte cannot be dereferenced
Next TopicJava Byte