Why mutableMapOf returns nullable?

Viewed 352

I wrote a simple code block to store fragments with ids in Map. The value and key of map is initialized as non-nullable but when I want to get them as key and value, it gives nullable type data. So, I don't understand why? Is there any other type of map that returns non-nullable data in Kotlin?

enter image description here

2 Answers
Related