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
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents