Java ConcurrentHashMap elements() MethodThe elements() method of ConcurrentHashMap class returns an enumeration of the values in this table. SyntaxParameterNo parameter is passed. Returnsan enumeration of the values in this table ThrowsNullPointerException Example 1Test it NowOutput: The Map is: {20=Cpython, 40=Ec++, 10=Ajava, 30=Dc} The values are: Cpython Ec++ Ajava Dc Example 2Test it NowOutput: The Map is: {AA=1java, BB=2.net, CC=3python, DD=4c, EE=5c++} The values are: 1java 2.net 3python 4c 5c++
Next TopicJava ConcurrentHashMap
|