Scala Map count() method with example
The count() method is utilized to count pair of keys in the Map.
Method Definition: def count(p: ((A, B)) => Boolean): Int
Return Type: It returns the number of keys present in the map that satisfies the given predicate.
So, the identical keys are counted only once.
My Personal Notes arrow_drop_up
Please Login to comment...