Woohoo! Excellent work. You’ve completed the final lesson on collection types in Kotlin. Let’s review what was covered:
mapOfkeyword and indicates a map whose entries cannot change throughout a program.
mutableMapOfkeyword and indicates a Map whose entries can be altered.
valuesproperty. To return all the keys in a map, use the
put()function accepts a key and a value to add to a map.
remove()function accepts a key and removes the entry associated with that key.
You’ve now covered the third and final major collection that exists in Kotlin. Feel free to utilize the empty Review.kt file and output terminal on the right to hone your understanding of maps and practice writing Kotlin code.
Click Up Next when you’ve completed the review and are ready to move on.