def main(args: Array[String]): Unit = {
val scores = scala.collection.mutable.Map("alice" → 90, "bob" → 85)
scores += ("max" → 100)
println(scores)
val provinceInfo = scala.collection.immutable.Map("42" → "湖北")
val new
object Map02 {
def main(args: Array[String]): Unit = {
val scores = scala.collection.mutable.Map("alice" → 90, "bob1" → 85)
scores += ("max" → 100)
scores -= "alice"
val rst = scores.get("bob1")
if(rst.isEmpty){
println("bob1没有成绩")
} else {
println(rst.get)
}
println(scores)
for ((key,value) <- scores){
println(s"${key}, ${value}分")
}
scores.foreach({
case (key,value) => println(s"${key}, ${value}分")
})


