Is it allowed to have map with keys of different types?
val myMap = Map("Ann Arbor" -> "MI", 49931 -> "MI")
Explanation
The type of key will be Any.

Source: Scala Exercises: Maps

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback