Java ConcurrentHashMap contains() MethodThe contains() method of ConcurrentHashMap class tests if some key maps into the specified value in this table. SyntaxParametervalue - a value to search for. Returnstrue if some key maps to the value argument 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 c present? :: true Example 2Test it NowOutput: Mappings are: {Delhi=100, Keral=400, Noida=200, Mumbai=300} is c present? :: false
Next TopicJava ConcurrentHashMap
|