Scala Map apply() method with example
The apply() is utilized to search a key in the stated map.
Method Definition: m1.apply(“key”)
Here m1 is map.
Return Type: It returns the value of the key to be searched.
Here, identical keys are present with different values so, the value of the last one is returned.