![]() The !! operator in Kotlin allow the programmer to tell the compiler “Ok, I know what I do, and I promise, it won’t be null”. lateinit: In case of late-initialization (like in a test), there is a specific language keyworkd lateinit which allow to declare a non-null member without initializing it in the constructor.Īll of that makes dealing with nullability really great in Kotlin. ![]() Therefore the Kotlin compiler is able to smart-cast.
0 Comments
Leave a Reply. |