Java EnumMap hashCode() methodThe hashCode() method of Java EnumMap class is used to get the hashcode value of the EnumMap.This method returns an integer whose value is the sum of the hash codes of each entry in the map. SyntaxParametersNA ReturnsThis method returns the hash code value for this map. ExceptionNA Example 1Test it NowOutput: Hash code value of the map: -450357866 Hash code value after clearing the map: 0 Example 2Test it NowOutput: Hash code value of the map: -1315471824 Hash code value after clearing the map: 0
Next TopicJava EnumMap
|