Created
October 7, 2021 11:39
-
-
Save nbness2/fce138f0d5216999ea2b152154bb45ed to your computer and use it in GitHub Desktop.
Kotlin Non-null String example`
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
var nullableString: String | |
nullableString = "not null" | |
nullableString = null // wait, the compiler no longer likes this. no compile for you! | |
println(nullableString) // we don't even get a chance to try! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment