Skip to content

Repository files navigation

Hashmapkt

valhashMap: HashMap<Int, String> = HashMap()
valhashMap2: HashMap<String, String> = HashMap(2) // only 2 capacityhashMap.put(1, "M")
hashMap.put(2, "Fadli")
hashMap.put(3, "ZEIN")
hashMap.put(4, "ZEIN")
hashMap.put(5, "M. Fadli Zein") // 5 as indexhashMap2.put("index1", "M") // index1 as indexprintln(hashMap[2])
println(hashMap[5])
println("String "+hashMap2["index1"])
for (keyinhashMap.keys){
println("for1 "+hashMap.get(key))
}

Copyright 2021 M. Fadli Zein

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages