1、mutable.Map to immutable.Map
val map = mutable.Map(1 -> "zhangsan", 2 -> "lisi")
val result = map.toMap
2、immutable.Map to mutable.Map
val map = immutable.Map(1 -> "zhangsan", 2 -> "lisi")
val result = mutable.Map(map.toSeq: _*)
————————————————
版权声明:本文为CSDN博主「Michael-JOE」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/kanaka10/article/details/82878474