Skip to content

Instantly share code, notes, and snippets.

@jpitchardu
Created May 23, 2018 16:24
Show Gist options
  • Save jpitchardu/99931ab7ed668d33156de5ceb28b8218 to your computer and use it in GitHub Desktop.
Save jpitchardu/99931ab7ed668d33156de5ceb28b8218 to your computer and use it in GitHub Desktop.
Null-safety example in Kotlin
val object: SomeClass?
object?.prop1?.prop2?.prop3 ?: "SomeDefaultValue";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment