73
Java Short hashCode() Method
The hashCode() method of Java Short class. It will return the value of Short object in to hash code.
Syntax
Since java 1.8, it can also be declared as following:
Parameters
X: short value
Return value
It returns hash code value of a short value
Example 1
Output:
Short ' 100 ' value converted into hash code is = 100
Example 2
Output:
Short ' -300 ' value converted into hash code is = -300
Example 3
Output:
Short ' 500 ' value converted into hash code is = 500
Example 4
Output:
Short ' -1500 ' value converted into hash code is = -1500
Next TopicJava Short