belongs to collection: Kotlin programming Exercises
Write a program in kotlin to map the following
Item 1, Item 2, Item 3, Item 4 22, 10, 12, 33
Solution:
val map = mapOf(Pair("Item 1", 22), Pair("Item 2", 10), Pair("Item 3", 12), Pair("Item 4", 33)) println(map)
Output:
{Item 1=22, Item 2=10, Item 3=12, Item 4=33}
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Solution:
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer