9/4/2023 0 Comments Kotlin null safety![]() If we try to use this variable then we will get NullPointerException or NPE. In programming world when a variable doesn't refer to anything then it is considered as null. It kills one major benefit of using Kotlin.In this tutorial we will discuss about one of the most important features of Kotlin: Null Safety. It is very error-prone as plain old NPE may appear at run-time again. It is nothing more than a way to stop using all the benefits of Kotlin type system. 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”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |