Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardKotlinplatform types mechanicsSingle-choice MCQ

Java method `List<String> names()` is called from Kotlin and the result type is the platform type `(Mutable)List<String!>!`. A senior notes the elements are themselves platform-typed. What does this nesting imply about runtime checks on element access?

// Java: List<String> names(); val list = JavaApi.names() // (Mutable)List<String!>! val first = list[0] // type is String! val forced: String = list[0] // check happens here