From 4c51b5b8d2e6c8ba42a48a82bafe5d251247b36d Mon Sep 17 00:00:00 2001 From: luming Date: Wed, 30 Jun 2021 17:16:31 +0800 Subject: [PATCH] =?UTF-8?q?map=E9=81=8D=E5=8E=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/senior/Collection/CollectioMap.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/senior/Collection/CollectioMap.kt b/src/senior/Collection/CollectioMap.kt index e785608..f70d909 100644 --- a/src/senior/Collection/CollectioMap.kt +++ b/src/senior/Collection/CollectioMap.kt @@ -7,6 +7,9 @@ fun main(args: Array) { m.forEach{ println("key = ${it.key}, value = ${it.value}") } + for ((k,v) in m) { + println("k = $k,v = $v") + } println(m.get("a")) // 可变map var map: MutableMap = mutableMapOf()