Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyKotlinnull safety and double bangSingle-choice MCQ

Inside this if-block, why can name.length be called without ?. or !!?

val name: String? = getName() if (name != null) { println(name.length) }