Online Java Compiler By
JavaTpoint.com
public class ShortHashCodeExample1 { public static void main(String[] args) { Short sValue=100; //with positive Value //it returns hash code value int hcode = sValue.hashCode(); System.out.println(" Short ' "+sValue+" ' value converted into hash code is = " + hcode); } }
Output