Java ConcurrentHashMap equals() MethodThe elements() method of ConcurrentHashMap class Compares the specified object with this map for equality and returns true if the given object is a map with the same mappings as this map. SyntaxParametero - object to be compared for equality with this map ReturnsIt returns true if the specified object is equal to this map. ThrowsNo exception is thrown. Example 1Test it NowOutput: comparing mymap and mymap2 :true Example 2Test it NowOutput: comparing mymap and mymap2 :false
Next TopicJava ConcurrentHashMap
|