Java Short hashCode() MethodThe hashCode() method of Java Short class. It will return the value of Short object in to hash code. SyntaxSince java 1.8, it can also be declared as following:ParametersX: short value Return valueIt returns hash code value of a short value Example 1Test it NowOutput: Short ' 100 ' value converted into hash code is = 100 Example 2Test it NowOutput: Short ' -300 ' value converted into hash code is = -300 Example 3Test it NowOutput: Short ' 500 ' value converted into hash code is = 500 Example 4Test it NowOutput: Short ' -1500 ' value converted into hash code is = -1500
Next TopicJava Short
|