135
Java ConcurrentHashMap entrySet() Method
The entrySet() method of ConcurrentHashMap class returns a Set view of the mappings contained in this map. The changes made to the map are reflected in the set, and vice-versa.
Syntax
Parameter
No parameter is passed.
Returns
the set view
Throws
No exception is passed.
Example 1
Output:
myset values: [AA=Java, BB=angular, CC=JavaScript]
Example 2
Output:
[1=101, 2=102, 3=103, 4=104, 5=105, 6=106]
Next TopicJava ConcurrentHashMap