Java ConcurrentHashMap containsKey() MethodThe containsKey() method of ConcurrentHashMap class tests if the specified object is a key in this table. SyntaxParameterkey - possible key Returnstrue if and only if the specified object is a key in this table, as determined by the equals method; false otherwise ThrowsNullPointerException Example 1Test it NowOutput: Mappings are: {python=20, c++=30, java=10, c=25, .net=15} is java present? :: true Example 2Test it NowOutput: Mappings are: {python=20, c++=30, java=10, c=25, .net=15} is javascript present? :: false
Next TopicJava ConcurrentHashMap
|