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

A Java method returns a value with no nullability annotation, so Kotlin sees it as a platform type `String!`. What is the mechanical truth about when a null check is enforced?

// Java: String getName() { return null; } // Kotlin: val n: String = JavaApi.getName() // (A) val m: String? = JavaApi.getName() // (B) val len = JavaApi.getName().length // (C)