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

A Java method is declared `public String getName()` with no nullability annotations. Kotlin sees its return as the platform type `String!`. What does the compiler actually do at the bytecode level when you assign it to a non-null `val s: String`?

// Java: public String getName() { ... } val s: String = javaObj.name