I\'m working through Cay Horstmann\'s Scala for the Impatient book where I came across this way of updating a mutable map.
scala> val scores = scala.coll
The problem is you're trying to update immutable map. I had the same error message when my map was declared as
var m = new java.util.HashMap[String, Int]
But when i replaced the definition by
var m = new scala.collection.mutable.HashMap[String, Int]
the m.update worked.
m.update