Skip to main content
Journey Uncommon Logo
JourneyUncommon
easyKotlindouble bangSingle-choice MCQ

What is wrong with using !! in this code at runtime?

fun firstChar(s: String?): Char { return s!![0] } println(firstChar(null))