Java IdentityHashMap clear() methodThe clear() method of the Java IdentityHashMap class is used to remove all the key-value pairs from the calling IdentityHashMap. The IdentityHashMap will become empty after calling this method. SyntaxExample 1Test it NowOutput: is->2 best->4 Java->1 the->3 language->6 programming->5 true Example 2Test it NowOutput: false true
Next Topicjava IdentityHashMap
|