var listOfLists : List<List<Int>> = mutableListOf()
If I want to add some elements to the inner list, what should I do? The inner list seems to be immutable be default.
Same thing happens with Map. In Java, I can do this: Map<String, List<String>> map = ...... map.computeIfAbsent(key, key -> new ArrayList<>()).add("a string").
In Kotlin if you just do List it’s immutable. If you want to modify the content you must write the Mutable prefix. So, for List it’ll be MutableList and for Map it’ll be MutableMap