「Kotlin入門」MutableMapの作成サンプル
使用例
fun main() { val cftMp = mutableMapOf("name" to "A001", 2 to "B002", 3 to "C003") println(cftMp["name"]) cftMp["name"] = "D004" println(cftMp["name"]) }
>kotlin sample.jar
A001
D004
Coding Changes the World
使用例
fun main() { val cftMp = mutableMapOf("name" to "A001", 2 to "B002", 3 to "C003") println(cftMp["name"]) cftMp["name"] = "D004" println(cftMp["name"]) }
>kotlin sample.jar
A001
D004