The Java.util.EnumMap.containsValue(value) method in Java is used to determine whether one or more key of the map is associated with a given value or not. It takes the value as a parameter and returns True if that value is mapped by any of the keys in the EnumMap.
boolean containsValue(Object value)
Parameter: The method accepts one parameter value which refers to the value whose mapping is to be checked by any of the key.
Return Value: It returns true when one or more key is mapped to same value.
Below programs illustrate the containsValue() method:
// Java program to demonstrate containsValue() method
Please Login to comment...