Java IdentityHashMap containsValue() method

The containsValue(Object value) method of the Java IdentityHashMap class is used to check whether the calling IdentityHashMap contains the specified value.

Syntax

Parameters

Value - The possible value which is to be checked in the calling IdentityHashMap.

Return

True, if the calling IdentityHashMap contains the specified value.

Example 1

Output:

true
false
true
false

Example 2

Output:

true
false
true
false