Skip to content

Instantly share code, notes, and snippets.

@nbness2
Created October 7, 2021 11:39
Show Gist options
  • Save nbness2/fce138f0d5216999ea2b152154bb45ed to your computer and use it in GitHub Desktop.
Save nbness2/fce138f0d5216999ea2b152154bb45ed to your computer and use it in GitHub Desktop.
Kotlin Non-null String example`
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