Created
November 15, 2019 16:06
-
-
Save MostafaNasiri/1a35dfa93296bfa99b7a0ee52af059cc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fun main() { | |
var name: String? = "Arthur" | |
var nameLength = name!!.length // nameLength = 6 | |
name = null | |
nameLength = name!!.length // KotlinNullPointerException | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment