Assertion

suggest change

!! suffixes ignore nullability and returns a non-null version of that type. KotlinNullPointerException will be thrown if the object is a null.

val message: String? = null
println(message!!) //KotlinNullPointerException thrown, app crashes

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents