Created
November 8, 2018 10:45
-
-
Save qwert2603/65f3201186a9ef01a408dad56e2b2fa7 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 getString(): String { | |
null?.let { return "fish" } | |
} | |
fun main() { | |
println(getString().length) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Exception in thread "main" java.lang.NullPointerException
at Kotlin_npeKt.main(kotlin_npe.kt:6)
at Kotlin_npeKt.main(kotlin_npe.kt