Can please anyone explain me this thing:
val list : kotlin.collections.List<Int> = kotlin.collections.ArrayList() // compiled successfully
Why this statement is compiled successfully in Kotlin?
kotlin.collections.ArrayList type is a
java.util.ArrayList class does not implement
This is an implementation issue. How java.util.ArrayList can implement kotlin List if it doesn’t know about it?
MutableList contains (a subset of) functions also found in
java.util.List The JVM target compiler transparently maps
MutableList, and vice versa.
List is a supertype of
MutableList, you can assign any